diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs
new file mode 100644
index 00000000..29cc8cb4
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs
@@ -0,0 +1,501 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentAnalyticsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_GetTraceSecurityRequirement0 =
+ 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_GetTraceSecurityRequirement1 =
+ 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_GetTraceSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_GetTraceSecurityRequirement0,
+ s_GetTraceSecurityRequirement1,
+ };
+ partial void PrepareGetTraceArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string traceId);
+ partial void PrepareGetTraceRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string traceId);
+ partial void ProcessGetTraceResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetTraceResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get agent trace
+ /// Retrieve the summary of a specific agent trace by its trace ID.
+ ///
+ ///
+ ///
+ ///
+ /// Example: 0af7651916cd43dd8448eb211c80319c
+ ///
+ /// 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 GetTraceAsync(
+ string traceId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetTraceArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ traceId: ref traceId);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetTraceSecurityRequirements,
+ operationName: "GetTraceAsync");
+
+ 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_analytics/traces/{traceId}",
+ 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);
+ PrepareGetTraceRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ traceId: traceId);
+
+ 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: "GetTrace",
+ methodName: "GetTraceAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTrace",
+ methodName: "GetTraceAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTrace",
+ methodName: "GetTraceAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetTraceResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTrace",
+ methodName: "GetTraceAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTrace",
+ methodName: "GetTraceAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow accessing this trace.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Trace 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessGetTraceResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.AgentTrace.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.AgentTrace.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentAnalyticsClient.GetTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs
new file mode 100644
index 00000000..72a235e7
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs
@@ -0,0 +1,516 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentAnalyticsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_GetTraceSpanSecurityRequirement0 =
+ 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_GetTraceSpanSecurityRequirement1 =
+ 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_GetTraceSpanSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_GetTraceSpanSecurityRequirement0,
+ s_GetTraceSpanSecurityRequirement1,
+ };
+ partial void PrepareGetTraceSpanArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string traceId,
+ ref string spanId,
+ ref bool? includeContent);
+ partial void PrepareGetTraceSpanRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string traceId,
+ string spanId,
+ bool? includeContent);
+ partial void ProcessGetTraceSpanResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetTraceSpanResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get span in a trace
+ /// Retrieve the details of a specific span within a trace.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ /// 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 GetTraceSpanAsync(
+ string traceId,
+ string spanId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ bool? includeContent = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetTraceSpanArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ traceId: ref traceId,
+ spanId: ref spanId,
+ includeContent: ref includeContent);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetTraceSpanSecurityRequirements,
+ operationName: "GetTraceSpanAsync");
+
+ 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_analytics/traces/{traceId}/spans/{spanId}",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("include_content", includeContent?.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);
+ PrepareGetTraceSpanRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ traceId: traceId,
+ spanId: spanId,
+ includeContent: includeContent);
+
+ 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: "GetTraceSpan",
+ methodName: "GetTraceSpanAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans/{spanId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTraceSpan",
+ methodName: "GetTraceSpanAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans/{spanId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTraceSpan",
+ methodName: "GetTraceSpanAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans/{spanId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetTraceSpanResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTraceSpan",
+ methodName: "GetTraceSpanAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans/{spanId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetTraceSpan",
+ methodName: "GetTraceSpanAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans/{spanId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow accessing this span.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Trace or span 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessGetTraceSpanResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.AgentTraceSpan.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.AgentTraceSpan.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentAnalyticsClient.ListTraceSpans.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs
new file mode 100644
index 00000000..19e7f341
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs
@@ -0,0 +1,533 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentAnalyticsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_ListTraceSpansSecurityRequirement0 =
+ 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_ListTraceSpansSecurityRequirement1 =
+ 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_ListTraceSpansSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_ListTraceSpansSecurityRequirement0,
+ s_ListTraceSpansSecurityRequirement1,
+ };
+ partial void PrepareListTraceSpansArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string traceId,
+ ref bool? includeContent,
+ ref global::Vectara.ListTraceSpansOperation? operation,
+ ref int? limit,
+ ref string? pageKey);
+ partial void PrepareListTraceSpansRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string traceId,
+ bool? includeContent,
+ global::Vectara.ListTraceSpansOperation? operation,
+ int? limit,
+ string? pageKey);
+ partial void ProcessListTraceSpansResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListTraceSpansResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List spans in a trace
+ /// Retrieve the flat list of spans for a given trace, each with its parent_span_id for reconstructing the tree.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ ///
+ ///
+ /// Default Value: 100
+ ///
+ ///
+ /// 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 ListTraceSpansAsync(
+ string traceId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ bool? includeContent = default,
+ global::Vectara.ListTraceSpansOperation? operation = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListTraceSpansArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ traceId: ref traceId,
+ includeContent: ref includeContent,
+ operation: ref operation,
+ limit: ref limit,
+ pageKey: ref pageKey);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListTraceSpansSecurityRequirements,
+ operationName: "ListTraceSpansAsync");
+
+ 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_analytics/traces/{traceId}/spans",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("include_content", includeContent?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("operation", operation?.ToValueString())
+ .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);
+ PrepareListTraceSpansRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ traceId: traceId,
+ includeContent: includeContent,
+ operation: operation,
+ 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: "ListTraceSpans",
+ methodName: "ListTraceSpansAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraceSpans",
+ methodName: "ListTraceSpansAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraceSpans",
+ methodName: "ListTraceSpansAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListTraceSpansResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraceSpans",
+ methodName: "ListTraceSpansAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraceSpans",
+ methodName: "ListTraceSpansAsync",
+ pathTemplate: "$\"/v2/agent_analytics/traces/{traceId}/spans\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow accessing this trace.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Trace 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessListTraceSpansResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.ListAgentTraceSpansResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.ListAgentTraceSpansResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentAnalyticsClient.ListTraces.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs
new file mode 100644
index 00000000..be4c9360
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs
@@ -0,0 +1,550 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentAnalyticsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_ListTracesSecurityRequirement0 =
+ 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_ListTracesSecurityRequirement1 =
+ 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_ListTracesSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_ListTracesSecurityRequirement0,
+ s_ListTracesSecurityRequirement1,
+ };
+ partial void PrepareListTracesArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string? agentKey,
+ ref string? sessionKey,
+ ref global::Vectara.ListTracesStatus? status,
+ ref global::Vectara.ListTracesErrorType? errorType,
+ ref global::Vectara.ListTracesOperation? operation,
+ ref string? toolName,
+ ref global::Vectara.ListTracesToolErrorType? toolErrorType,
+ ref global::System.DateTime? startedAfter,
+ ref global::System.DateTime? startedBefore,
+ ref long? minDurationMs,
+ ref long? maxDurationMs,
+ ref int? limit,
+ ref string? pageKey);
+ partial void PrepareListTracesRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string? agentKey,
+ string? sessionKey,
+ global::Vectara.ListTracesStatus? status,
+ global::Vectara.ListTracesErrorType? errorType,
+ global::Vectara.ListTracesOperation? operation,
+ string? toolName,
+ global::Vectara.ListTracesToolErrorType? toolErrorType,
+ global::System.DateTime? startedAfter,
+ global::System.DateTime? startedBefore,
+ long? minDurationMs,
+ long? maxDurationMs,
+ int? limit,
+ string? pageKey);
+ partial void ProcessListTracesResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListTracesResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List agent traces
+ /// List agent traces with optional filtering by agent, session, status, and time range.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 ListTracesAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? agentKey = default,
+ string? sessionKey = default,
+ global::Vectara.ListTracesStatus? status = default,
+ global::Vectara.ListTracesErrorType? errorType = default,
+ global::Vectara.ListTracesOperation? operation = default,
+ string? toolName = default,
+ global::Vectara.ListTracesToolErrorType? toolErrorType = default,
+ global::System.DateTime? startedAfter = default,
+ global::System.DateTime? startedBefore = default,
+ long? minDurationMs = default,
+ long? maxDurationMs = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListTracesArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ agentKey: ref agentKey,
+ sessionKey: ref sessionKey,
+ status: ref status,
+ errorType: ref errorType,
+ operation: ref operation,
+ toolName: ref toolName,
+ toolErrorType: ref toolErrorType,
+ startedAfter: ref startedAfter,
+ startedBefore: ref startedBefore,
+ minDurationMs: ref minDurationMs,
+ maxDurationMs: ref maxDurationMs,
+ limit: ref limit,
+ pageKey: ref pageKey);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListTracesSecurityRequirements,
+ operationName: "ListTracesAsync");
+
+ 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_analytics/traces",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("agent_key", agentKey)
+ .AddOptionalParameter("session_key", sessionKey)
+ .AddOptionalParameter("status", status?.ToValueString())
+ .AddOptionalParameter("error_type", errorType?.ToValueString())
+ .AddOptionalParameter("operation", operation?.ToValueString())
+ .AddOptionalParameter("tool_name", toolName)
+ .AddOptionalParameter("tool_error_type", toolErrorType?.ToValueString())
+ .AddOptionalParameter("started_after", startedAfter?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
+ .AddOptionalParameter("started_before", startedBefore?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
+ .AddOptionalParameter("min_duration_ms", minDurationMs?.ToString())
+ .AddOptionalParameter("max_duration_ms", maxDurationMs?.ToString())
+ .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);
+ PrepareListTracesRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ status: status,
+ errorType: errorType,
+ operation: operation,
+ toolName: toolName,
+ toolErrorType: toolErrorType,
+ startedAfter: startedAfter,
+ startedBefore: startedBefore,
+ minDurationMs: minDurationMs,
+ maxDurationMs: maxDurationMs,
+ 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: "ListTraces",
+ methodName: "ListTracesAsync",
+ pathTemplate: "\"/v2/agent_analytics/traces\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraces",
+ methodName: "ListTracesAsync",
+ pathTemplate: "\"/v2/agent_analytics/traces\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraces",
+ methodName: "ListTracesAsync",
+ pathTemplate: "\"/v2/agent_analytics/traces\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListTracesResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraces",
+ methodName: "ListTracesAsync",
+ pathTemplate: "\"/v2/agent_analytics/traces\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListTraces",
+ methodName: "ListTracesAsync",
+ pathTemplate: "\"/v2/agent_analytics/traces\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow listing traces.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessListTracesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.ListAgentTracesResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.ListAgentTracesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentAnalyticsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.g.cs
new file mode 100644
index 00000000..4eb291fe
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.g.cs
@@ -0,0 +1,118 @@
+
+#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 AgentAnalyticsClient : global::Vectara.IAgentAnalyticsClient, 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 AgentAnalyticsClient.
+ /// 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 AgentAnalyticsClient(
+ 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 AgentAnalyticsClient.
+ /// 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 AgentAnalyticsClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ global::Vectara.AutoSDKClientOptions? options = null,
+ 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.AgentsClient.CreateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs
new file mode 100644
index 00000000..30dfd07b
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs
@@ -0,0 +1,624 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_CreateConnectorSecurityRequirement0 =
+ 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_CreateConnectorSecurityRequirement1 =
+ 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_CreateConnectorSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_CreateConnectorSecurityRequirement0,
+ s_CreateConnectorSecurityRequirement1,
+ };
+ partial void PrepareCreateConnectorArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string agentKey,
+ global::Vectara.CreateAgentConnectorRequest request);
+ partial void PrepareCreateConnectorRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string agentKey,
+ global::Vectara.CreateAgentConnectorRequest request);
+ partial void ProcessCreateConnectorResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessCreateConnectorResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Create agent connector
+ /// Create a new connector for an agent to receive events from external platforms like Slack.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_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 CreateConnectorAsync(
+ string agentKey,
+
+ global::Vectara.CreateAgentConnectorRequest 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);
+ PrepareCreateConnectorArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ agentKey: ref agentKey,
+ request: request);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_CreateConnectorSecurityRequirements,
+ operationName: "CreateConnectorAsync");
+
+ 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/agents/{agentKey}/connectors",
+ 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);
+ PrepareCreateConnectorRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ 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: "CreateConnector",
+ methodName: "CreateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateConnector",
+ methodName: "CreateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateConnector",
+ methodName: "CreateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessCreateConnectorResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateConnector",
+ methodName: "CreateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "CreateConnector",
+ methodName: "CreateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Connector creation request was malformed or contains invalid configuration.
+ 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 new global::Vectara.ApiException(
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_400,
+ ResponseObject = __value_400,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Permissions do not allow creating connectors for this agent.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessCreateConnectorResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Create agent connector
+ /// Create a new connector for an agent to receive events from external platforms like Slack.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// The human-readable name of the connector.
+ /// Example: Customer Support Slack Channel
+ ///
+ ///
+ /// A detailed description of what this connector does.
+ /// Example: Receives customer support messages from the
+ ///
+ ///
+ /// The type of connector.
+ /// Example: slack
+ ///
+ ///
+ /// Arbitrary metadata associated with the connector.
+ /// Default Value: {}
+ /// Example: {"priority":"high","department":"customer_service"}
+ ///
+ ///
+ /// Whether the connector should be enabled upon creation.
+ /// Default Value: true
+ /// Example: true
+ ///
+ ///
+ /// Configuration for different types of connectors.
+ ///
+ /// 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 CreateConnectorAsync(
+ string agentKey,
+ string name,
+ global::Vectara.SlackConnectorConfiguration configuration,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? description = default,
+ global::Vectara.CreateAgentConnectorRequestType type = default,
+ object? metadata = default,
+ bool? enabled = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Vectara.CreateAgentConnectorRequest
+ {
+ Name = name,
+ Description = description,
+ Type = type,
+ Metadata = metadata,
+ Enabled = enabled,
+ Configuration = configuration,
+ };
+
+ return await CreateConnectorAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs
new file mode 100644
index 00000000..11bb81da
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs
@@ -0,0 +1,489 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_DeleteConnectorSecurityRequirement0 =
+ 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_DeleteConnectorSecurityRequirement1 =
+ 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_DeleteConnectorSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_DeleteConnectorSecurityRequirement0,
+ s_DeleteConnectorSecurityRequirement1,
+ };
+ partial void PrepareDeleteConnectorArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string agentKey,
+ ref string connectorId);
+ partial void PrepareDeleteConnectorRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string agentKey,
+ string connectorId);
+ partial void ProcessDeleteConnectorResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Delete agent connector
+ /// Permanently delete an agent connector and all its associated configuration. This action cannot be undone.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_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 DeleteConnectorAsync(
+ string agentKey,
+ string connectorId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareDeleteConnectorArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ agentKey: ref agentKey,
+ connectorId: ref connectorId);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_DeleteConnectorSecurityRequirements,
+ operationName: "DeleteConnectorAsync");
+
+ 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/agents/{agentKey}/connectors/{connectorId}",
+ 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);
+ PrepareDeleteConnectorRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ connectorId: connectorId);
+
+ 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: "DeleteConnector",
+ methodName: "DeleteConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteConnector",
+ methodName: "DeleteConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteConnector",
+ methodName: "DeleteConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessDeleteConnectorResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteConnector",
+ methodName: "DeleteConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "DeleteConnector",
+ methodName: "DeleteConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "DELETE",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow deleting this connector.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent or connector 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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();
+
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentsClient.GetConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs
new file mode 100644
index 00000000..42bd2f22
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs
@@ -0,0 +1,510 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_GetConnectorSecurityRequirement0 =
+ 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_GetConnectorSecurityRequirement1 =
+ 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_GetConnectorSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_GetConnectorSecurityRequirement0,
+ s_GetConnectorSecurityRequirement1,
+ };
+ partial void PrepareGetConnectorArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string agentKey,
+ ref string connectorId);
+ partial void PrepareGetConnectorRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string agentKey,
+ string connectorId);
+ partial void ProcessGetConnectorResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetConnectorResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get agent connector
+ /// Retrieve the details of a specific agent connector by its ID, including its configuration and status.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_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 GetConnectorAsync(
+ string agentKey,
+ string connectorId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetConnectorArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ agentKey: ref agentKey,
+ connectorId: ref connectorId);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetConnectorSecurityRequirements,
+ operationName: "GetConnectorAsync");
+
+ 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/agents/{agentKey}/connectors/{connectorId}",
+ 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);
+ PrepareGetConnectorRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ connectorId: connectorId);
+
+ 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: "GetConnector",
+ methodName: "GetConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetConnector",
+ methodName: "GetConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetConnector",
+ methodName: "GetConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetConnectorResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetConnector",
+ methodName: "GetConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetConnector",
+ methodName: "GetConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow accessing this connector.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent or connector 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessGetConnectorResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentsClient.ListConnectors.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs
new file mode 100644
index 00000000..918200df
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs
@@ -0,0 +1,538 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_ListConnectorsSecurityRequirement0 =
+ 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_ListConnectorsSecurityRequirement1 =
+ 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_ListConnectorsSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_ListConnectorsSecurityRequirement0,
+ s_ListConnectorsSecurityRequirement1,
+ };
+ partial void PrepareListConnectorsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string agentKey,
+ ref global::Vectara.ListAgentConnectorsType? type,
+ ref bool? enabled,
+ ref int? limit,
+ ref string? pageKey);
+ partial void PrepareListConnectorsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string agentKey,
+ global::Vectara.ListAgentConnectorsType? type,
+ bool? enabled,
+ int? limit,
+ string? pageKey);
+ partial void ProcessListConnectorsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListConnectorsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List agent connectors
+ /// List all connectors for a specific agent, with optional filtering and pagination.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: slack
+ ///
+ ///
+ /// Example: true
+ ///
+ ///
+ /// 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 ListConnectorsAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.ListAgentConnectorsType? type = default,
+ bool? enabled = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListConnectorsArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ agentKey: ref agentKey,
+ type: ref type,
+ enabled: ref enabled,
+ limit: ref limit,
+ pageKey: ref pageKey);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListConnectorsSecurityRequirements,
+ operationName: "ListConnectorsAsync");
+
+ 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/agents/{agentKey}/connectors",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("type", type?.ToValueString())
+ .AddOptionalParameter("enabled", enabled?.ToString().ToLowerInvariant())
+ .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);
+ PrepareListConnectorsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ type: type,
+ enabled: enabled,
+ 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: "ListConnectors",
+ methodName: "ListConnectorsAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListConnectors",
+ methodName: "ListConnectorsAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListConnectors",
+ methodName: "ListConnectorsAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListConnectorsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListConnectors",
+ methodName: "ListConnectorsAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListConnectors",
+ methodName: "ListConnectorsAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Permissions do not allow listing connectors for this agent.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessListConnectorsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.ListAgentConnectorsResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.ListAgentConnectorsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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.AgentsClient.UpdateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs
new file mode 100644
index 00000000..c91b1323
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs
@@ -0,0 +1,629 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ public partial class AgentsClient
+ {
+
+
+ private static readonly global::Vectara.EndPointSecurityRequirement s_UpdateConnectorSecurityRequirement0 =
+ 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_UpdateConnectorSecurityRequirement1 =
+ 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_UpdateConnectorSecurityRequirements =
+ new global::Vectara.EndPointSecurityRequirement[]
+ { s_UpdateConnectorSecurityRequirement0,
+ s_UpdateConnectorSecurityRequirement1,
+ };
+ partial void PrepareUpdateConnectorArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? requestTimeout,
+ ref int? requestTimeoutMillis,
+ ref string agentKey,
+ ref string connectorId,
+ global::Vectara.UpdateAgentConnectorRequest request);
+ partial void PrepareUpdateConnectorRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? requestTimeout,
+ int? requestTimeoutMillis,
+ string agentKey,
+ string connectorId,
+ global::Vectara.UpdateAgentConnectorRequest request);
+ partial void ProcessUpdateConnectorResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateConnectorResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update agent connector
+ /// Update an existing agent connector's configuration, status, or other properties.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_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 UpdateConnectorAsync(
+ string agentKey,
+ string connectorId,
+
+ global::Vectara.UpdateAgentConnectorRequest 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);
+ PrepareUpdateConnectorArguments(
+ httpClient: HttpClient,
+ requestTimeout: ref requestTimeout,
+ requestTimeoutMillis: ref requestTimeoutMillis,
+ agentKey: ref agentKey,
+ connectorId: ref connectorId,
+ request: request);
+
+
+ var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateConnectorSecurityRequirements,
+ operationName: "UpdateConnectorAsync");
+
+ 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/agents/{agentKey}/connectors/{connectorId}",
+ 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);
+ PrepareUpdateConnectorRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ connectorId: connectorId,
+ 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: "UpdateConnector",
+ methodName: "UpdateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ 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 __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateConnector",
+ methodName: "UpdateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateConnector",
+ methodName: "UpdateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateConnectorResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateConnector",
+ methodName: "UpdateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateConnector",
+ methodName: "UpdateConnectorAsync",
+ pathTemplate: "$\"/v2/agents/{agentKey}/connectors/{connectorId}\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Connector update request was malformed or contains invalid configuration.
+ 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 new global::Vectara.ApiException(
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_400,
+ ResponseObject = __value_400,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Permissions do not allow updating this connector.
+ 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 new global::Vectara.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent or connector 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 new global::Vectara.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __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);
+ ProcessUpdateConnectorResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ 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);
+
+ return
+ await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ 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 new global::Vectara.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update agent connector
+ /// Update an existing agent connector's configuration, status, or other properties.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_support
+ ///
+ ///
+ /// The human-readable name of the connector.
+ /// Example: Updated Customer Support Slack Channel
+ ///
+ ///
+ /// A detailed description of what this connector does.
+ /// Example: Updated description for the Slack connector
+ ///
+ ///
+ /// Arbitrary metadata associated with the connector.
+ /// Example: {"priority":"medium","department":"customer_service","last_reviewed":"2024-01-15"}
+ ///
+ ///
+ /// Whether the connector is enabled.
+ /// Example: false
+ ///
+ ///
+ /// Configuration for different types of connectors.
+ ///
+ /// 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 UpdateConnectorAsync(
+ string agentKey,
+ string connectorId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? name = default,
+ string? description = default,
+ object? metadata = default,
+ bool? enabled = default,
+ global::Vectara.SlackConnectorConfiguration? configuration = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Vectara.UpdateAgentConnectorRequest
+ {
+ Name = name,
+ Description = description,
+ Metadata = metadata,
+ Enabled = enabled,
+ Configuration = configuration,
+ };
+
+ return await UpdateConnectorAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ connectorId: connectorId,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.GetTrace.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.GetTrace.g.cs
new file mode 100644
index 00000000..f181e7cf
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.GetTrace.g.cs
@@ -0,0 +1,26 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentAnalyticsClient
+ {
+ ///
+ /// Get agent trace
+ /// Retrieve the summary of a specific agent trace by its trace ID.
+ ///
+ ///
+ ///
+ ///
+ /// Example: 0af7651916cd43dd8448eb211c80319c
+ ///
+ /// 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 GetTraceAsync(
+ string traceId,
+ 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.IAgentAnalyticsClient.GetTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.GetTraceSpan.g.cs
new file mode 100644
index 00000000..fe7fd5f9
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.GetTraceSpan.g.cs
@@ -0,0 +1,30 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentAnalyticsClient
+ {
+ ///
+ /// Get span in a trace
+ /// Retrieve the details of a specific span within a trace.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ /// 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 GetTraceSpanAsync(
+ string traceId,
+ string spanId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ bool? includeContent = 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.IAgentAnalyticsClient.ListTraceSpans.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraceSpans.g.cs
new file mode 100644
index 00000000..e85f968b
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraceSpans.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentAnalyticsClient
+ {
+ ///
+ /// List spans in a trace
+ /// Retrieve the flat list of spans for a given trace, each with its parent_span_id for reconstructing the tree.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ ///
+ ///
+ /// Default Value: 100
+ ///
+ ///
+ /// 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 ListTraceSpansAsync(
+ string traceId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ bool? includeContent = default,
+ global::Vectara.ListTraceSpansOperation? operation = 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.IAgentAnalyticsClient.ListTraces.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraces.g.cs
new file mode 100644
index 00000000..a5fc8f34
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraces.g.cs
@@ -0,0 +1,50 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentAnalyticsClient
+ {
+ ///
+ /// List agent traces
+ /// List agent traces with optional filtering by agent, session, status, and time range.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 ListTracesAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? agentKey = default,
+ string? sessionKey = default,
+ global::Vectara.ListTracesStatus? status = default,
+ global::Vectara.ListTracesErrorType? errorType = default,
+ global::Vectara.ListTracesOperation? operation = default,
+ string? toolName = default,
+ global::Vectara.ListTracesToolErrorType? toolErrorType = default,
+ global::System.DateTime? startedAfter = default,
+ global::System.DateTime? startedBefore = default,
+ long? minDurationMs = default,
+ long? maxDurationMs = 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.IAgentAnalyticsClient.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.g.cs
new file mode 100644
index 00000000..dfd03423
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.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 IAgentAnalyticsClient : 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.IAgentsClient.CreateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.CreateConnector.g.cs
new file mode 100644
index 00000000..0e7705e1
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.CreateConnector.g.cs
@@ -0,0 +1,80 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentsClient
+ {
+ ///
+ /// Create agent connector
+ /// Create a new connector for an agent to receive events from external platforms like Slack.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_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 CreateConnectorAsync(
+ string agentKey,
+
+ global::Vectara.CreateAgentConnectorRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create agent connector
+ /// Create a new connector for an agent to receive events from external platforms like Slack.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// The human-readable name of the connector.
+ /// Example: Customer Support Slack Channel
+ ///
+ ///
+ /// A detailed description of what this connector does.
+ /// Example: Receives customer support messages from the
+ ///
+ ///
+ /// The type of connector.
+ /// Example: slack
+ ///
+ ///
+ /// Arbitrary metadata associated with the connector.
+ /// Default Value: {}
+ /// Example: {"priority":"high","department":"customer_service"}
+ ///
+ ///
+ /// Whether the connector should be enabled upon creation.
+ /// Default Value: true
+ /// Example: true
+ ///
+ ///
+ /// Configuration for different types of connectors.
+ ///
+ /// 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 CreateConnectorAsync(
+ string agentKey,
+ string name,
+ global::Vectara.SlackConnectorConfiguration configuration,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? description = default,
+ global::Vectara.CreateAgentConnectorRequestType type = default,
+ object? metadata = 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.IAgentsClient.DeleteConnector.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.DeleteConnector.g.cs
new file mode 100644
index 00000000..f3280108
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.DeleteConnector.g.cs
@@ -0,0 +1,31 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentsClient
+ {
+ ///
+ /// Delete agent connector
+ /// Permanently delete an agent connector and all its associated configuration. This action cannot be undone.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_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 DeleteConnectorAsync(
+ string agentKey,
+ string connectorId,
+ 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.IAgentsClient.GetConnector.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.GetConnector.g.cs
new file mode 100644
index 00000000..645b7222
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.GetConnector.g.cs
@@ -0,0 +1,31 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentsClient
+ {
+ ///
+ /// Get agent connector
+ /// Retrieve the details of a specific agent connector by its ID, including its configuration and status.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_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 GetConnectorAsync(
+ string agentKey,
+ string connectorId,
+ 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.IAgentsClient.ListConnectors.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.ListConnectors.g.cs
new file mode 100644
index 00000000..3cca0403
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.ListConnectors.g.cs
@@ -0,0 +1,41 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentsClient
+ {
+ ///
+ /// List agent connectors
+ /// List all connectors for a specific agent, with optional filtering and pagination.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: slack
+ ///
+ ///
+ /// Example: true
+ ///
+ ///
+ /// 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 ListConnectorsAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.ListAgentConnectorsType? type = default,
+ bool? enabled = 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.IAgentsClient.UpdateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.UpdateConnector.g.cs
new file mode 100644
index 00000000..cac4ab88
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.UpdateConnector.g.cs
@@ -0,0 +1,81 @@
+#nullable enable
+
+namespace Vectara
+{
+ public partial interface IAgentsClient
+ {
+ ///
+ /// Update agent connector
+ /// Update an existing agent connector's configuration, status, or other properties.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_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 UpdateConnectorAsync(
+ string agentKey,
+ string connectorId,
+
+ global::Vectara.UpdateAgentConnectorRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update agent connector
+ /// Update an existing agent connector's configuration, status, or other properties.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_support
+ ///
+ ///
+ /// The human-readable name of the connector.
+ /// Example: Updated Customer Support Slack Channel
+ ///
+ ///
+ /// A detailed description of what this connector does.
+ /// Example: Updated description for the Slack connector
+ ///
+ ///
+ /// Arbitrary metadata associated with the connector.
+ /// Example: {"priority":"medium","department":"customer_service","last_reviewed":"2024-01-15"}
+ ///
+ ///
+ /// Whether the connector is enabled.
+ /// Example: false
+ ///
+ ///
+ /// Configuration for different types of connectors.
+ ///
+ /// 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 UpdateConnectorAsync(
+ string agentKey,
+ string connectorId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? name = default,
+ string? description = default,
+ object? metadata = default,
+ bool? enabled = default,
+ global::Vectara.SlackConnectorConfiguration? configuration = 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.IVectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs
index b6262415..0d6ec6bb 100644
--- a/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs
@@ -59,6 +59,11 @@ public partial interface IVectaraClient : global::System.IDisposable
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ ///
+ ///
+ ///
+ public AgentAnalyticsClient AgentAnalytics { get; }
+
///
///
///
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorStatus.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorStatus.g.cs
new file mode 100644
index 00000000..276de3a4
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentConnectorStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentConnectorStatus 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.AgentConnectorStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentConnectorStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentConnectorStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentConnectorStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.AgentConnectorStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorStatusNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorStatusNullable.g.cs
new file mode 100644
index 00000000..0c31643e
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentConnectorStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentConnectorStatus? 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.AgentConnectorStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentConnectorStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentConnectorStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentConnectorStatus? 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.AgentConnectorStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorType.g.cs
new file mode 100644
index 00000000..3bcfc522
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentConnectorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentConnectorType 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.AgentConnectorTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentConnectorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentConnectorType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentConnectorType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.AgentConnectorTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorTypeNullable.g.cs
new file mode 100644
index 00000000..6853a079
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentConnectorTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentConnectorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentConnectorType? 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.AgentConnectorTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentConnectorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentConnectorType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentConnectorType? 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.AgentConnectorTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs
index 93cd9a5d..5f29d44d 100644
--- a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs
@@ -70,6 +70,13 @@ public class AgentToolConfigurationJsonConverter : global::System.Text.Json.Seri
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InlineSubAgentToolConfiguration)}");
subAgent = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
+ global::Vectara.InlineArtifactCreateToolConfiguration? artifactCreate = default;
+ if (discriminator?.Type == global::Vectara.AgentToolConfigurationDiscriminatorType.ArtifactCreate)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InlineArtifactCreateToolConfiguration)}");
+ artifactCreate = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
global::Vectara.InlineArtifactReadToolConfiguration? artifactRead = default;
if (discriminator?.Type == global::Vectara.AgentToolConfigurationDiscriminatorType.ArtifactRead)
{
@@ -122,6 +129,8 @@ public class AgentToolConfigurationJsonConverter : global::System.Text.Json.Seri
subAgent,
+ artifactCreate,
+
artifactRead,
artifactGrep,
@@ -187,6 +196,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineSubAgentToolConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubAgent!, typeInfo);
}
+ else if (value.IsArtifactCreate)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactCreateToolConfiguration).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactCreate!, typeInfo);
+ }
else if (value.IsArtifactRead)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactReadToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpan.g.cs
new file mode 100644
index 00000000..3778667a
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpan.g.cs
@@ -0,0 +1,177 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class AgentTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceSpan 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.AgentTraceSpanDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.AgentTraceSpanDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
+
+ global::Vectara.InvokeAgentTraceSpan? invokeAgent = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.InvokeAgent)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InvokeAgentTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InvokeAgentTraceSpan)}");
+ invokeAgent = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.ChatTraceSpan? chat = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.Chat)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ChatTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ChatTraceSpan)}");
+ chat = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.ExecuteToolTraceSpan? executeTool = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.ExecuteTool)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ExecuteToolTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ExecuteToolTraceSpan)}");
+ executeTool = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.ThinkingTraceSpan? thinking = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.Thinking)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ThinkingTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ThinkingTraceSpan)}");
+ thinking = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.OutputTraceSpan? output = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.Output)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OutputTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.OutputTraceSpan)}");
+ output = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.GuardrailTraceSpan? guardrail = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.Guardrail)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GuardrailTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GuardrailTraceSpan)}");
+ guardrail = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.StepTransitionTraceSpan? stepTransition = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.StepTransition)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.StepTransitionTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.StepTransitionTraceSpan)}");
+ stepTransition = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.ImageReadTraceSpan? imageRead = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.ImageRead)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ImageReadTraceSpan)}");
+ imageRead = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+ global::Vectara.CompactionTraceSpan? compaction = default;
+ if (discriminator?.Operation == global::Vectara.AgentTraceSpanDiscriminatorOperation.Compaction)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CompactionTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.CompactionTraceSpan)}");
+ compaction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+
+ var __value = new global::Vectara.AgentTraceSpan(
+ discriminator?.Operation,
+ invokeAgent,
+
+ chat,
+
+ executeTool,
+
+ thinking,
+
+ output,
+
+ guardrail,
+
+ stepTransition,
+
+ imageRead,
+
+ compaction
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceSpan 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.IsInvokeAgent)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InvokeAgentTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InvokeAgentTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.InvokeAgent!.Value, typeInfo);
+ }
+ else if (value.IsChat)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ChatTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ChatTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Chat!.Value, typeInfo);
+ }
+ else if (value.IsExecuteTool)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ExecuteToolTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ExecuteToolTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ExecuteTool!.Value, typeInfo);
+ }
+ else if (value.IsThinking)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ThinkingTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ThinkingTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Thinking!.Value, typeInfo);
+ }
+ else if (value.IsOutput)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OutputTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.OutputTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Output!.Value, typeInfo);
+ }
+ else if (value.IsGuardrail)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GuardrailTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GuardrailTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Guardrail!.Value, typeInfo);
+ }
+ else if (value.IsStepTransition)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.StepTransitionTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.StepTransitionTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.StepTransition!.Value, typeInfo);
+ }
+ else if (value.IsImageRead)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ImageReadTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageRead!.Value, typeInfo);
+ }
+ else if (value.IsCompaction)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CompactionTraceSpan), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CompactionTraceSpan).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Compaction!.Value, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperation.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperation.g.cs
new file mode 100644
index 00000000..d4f296ca
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperation.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentTraceSpanDiscriminatorOperationJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceSpanDiscriminatorOperation 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.AgentTraceSpanDiscriminatorOperationExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentTraceSpanDiscriminatorOperation)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentTraceSpanDiscriminatorOperation);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceSpanDiscriminatorOperation value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.AgentTraceSpanDiscriminatorOperationExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperationNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperationNullable.g.cs
new file mode 100644
index 00000000..9c832a62
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperationNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentTraceSpanDiscriminatorOperationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceSpanDiscriminatorOperation? 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.AgentTraceSpanDiscriminatorOperationExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentTraceSpanDiscriminatorOperation)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentTraceSpanDiscriminatorOperation?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceSpanDiscriminatorOperation? 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.AgentTraceSpanDiscriminatorOperationExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanStatus.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanStatus.g.cs
new file mode 100644
index 00000000..d201d826
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentTraceSpanStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceSpanStatus 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.AgentTraceSpanStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentTraceSpanStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentTraceSpanStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceSpanStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.AgentTraceSpanStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanStatusNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanStatusNullable.g.cs
new file mode 100644
index 00000000..07a6f8bd
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceSpanStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentTraceSpanStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceSpanStatus? 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.AgentTraceSpanStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentTraceSpanStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentTraceSpanStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceSpanStatus? 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.AgentTraceSpanStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceStatus.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceStatus.g.cs
new file mode 100644
index 00000000..ab1903ab
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentTraceStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceStatus 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.AgentTraceStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentTraceStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentTraceStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.AgentTraceStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceStatusNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceStatusNullable.g.cs
new file mode 100644
index 00000000..424f8f31
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentTraceStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class AgentTraceStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.AgentTraceStatus? 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.AgentTraceStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.AgentTraceStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.AgentTraceStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.AgentTraceStatus? 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.AgentTraceStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs
new file mode 100644
index 00000000..9d0f4eec
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs
@@ -0,0 +1,160 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class ChatTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ChatTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.cache_read_input_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.finish_reasons")) __score1++;
+ if (__jsonProps.Contains("attributes.input_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.max_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.model")) __score1++;
+ if (__jsonProps.Contains("attributes.output_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.provider_name")) __score1++;
+ if (__jsonProps.Contains("attributes.response_id")) __score1++;
+ if (__jsonProps.Contains("attributes.temperature")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.ChatTraceSpanVariant2? chatTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ChatTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ChatTraceSpanVariant2).Name}");
+ chatTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && chatTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ChatTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ChatTraceSpanVariant2).Name}");
+ chatTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.ChatTraceSpan(
+ agentBase,
+
+ chatTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ChatTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsChatTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ChatTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ChatTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs
new file mode 100644
index 00000000..b382e219
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs
@@ -0,0 +1,155 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class CompactionTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.CompactionTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.events_compacted")) __score1++;
+ if (__jsonProps.Contains("attributes.summary_key")) __score1++;
+ if (__jsonProps.Contains("attributes.turns_compacted")) __score1++;
+ if (__jsonProps.Contains("event_id")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.CompactionTraceSpanVariant2? compactionTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CompactionTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CompactionTraceSpanVariant2).Name}");
+ compactionTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && compactionTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CompactionTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CompactionTraceSpanVariant2).Name}");
+ compactionTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.CompactionTraceSpan(
+ agentBase,
+
+ compactionTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.CompactionTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsCompactionTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CompactionTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CompactionTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.CompactionTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfiguration.g.cs
new file mode 100644
index 00000000..0b3b2867
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfiguration.g.cs
@@ -0,0 +1,57 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class ConnectorConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ConnectorConfiguration 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.ConnectorConfigurationDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ConnectorConfigurationDiscriminator)}");
+ var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
+
+ global::Vectara.SlackConnectorConfiguration? slack = default;
+ if (discriminator?.Type == global::Vectara.ConnectorConfigurationDiscriminatorType.Slack)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SlackConnectorConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SlackConnectorConfiguration)}");
+ slack = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ }
+
+ var __value = new global::Vectara.ConnectorConfiguration(
+ discriminator?.Type,
+ slack
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ConnectorConfiguration 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.IsSlack)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.SlackConnectorConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SlackConnectorConfiguration).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Slack!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfigurationDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfigurationDiscriminatorType.g.cs
new file mode 100644
index 00000000..8ffa68a4
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfigurationDiscriminatorType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ConnectorConfigurationDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ConnectorConfigurationDiscriminatorType 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.ConnectorConfigurationDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ConnectorConfigurationDiscriminatorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ConnectorConfigurationDiscriminatorType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ConnectorConfigurationDiscriminatorType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ConnectorConfigurationDiscriminatorTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfigurationDiscriminatorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfigurationDiscriminatorTypeNullable.g.cs
new file mode 100644
index 00000000..d80cd008
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ConnectorConfigurationDiscriminatorTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ConnectorConfigurationDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ConnectorConfigurationDiscriminatorType? 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.ConnectorConfigurationDiscriminatorTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ConnectorConfigurationDiscriminatorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ConnectorConfigurationDiscriminatorType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ConnectorConfigurationDiscriminatorType? 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.ConnectorConfigurationDiscriminatorTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateAgentConnectorRequestType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateAgentConnectorRequestType.g.cs
new file mode 100644
index 00000000..f1401941
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateAgentConnectorRequestType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class CreateAgentConnectorRequestTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.CreateAgentConnectorRequestType 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.CreateAgentConnectorRequestTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.CreateAgentConnectorRequestType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.CreateAgentConnectorRequestType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.CreateAgentConnectorRequestType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.CreateAgentConnectorRequestTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullable.g.cs
new file mode 100644
index 00000000..b6ad4589
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class CreateAgentConnectorRequestTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.CreateAgentConnectorRequestType? 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.CreateAgentConnectorRequestTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.CreateAgentConnectorRequestType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.CreateAgentConnectorRequestType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.CreateAgentConnectorRequestType? 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.CreateAgentConnectorRequestTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs
new file mode 100644
index 00000000..8518be97
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs
@@ -0,0 +1,159 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class ExecuteToolTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ExecuteToolTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.corpus_keys")) __score1++;
+ if (__jsonProps.Contains("attributes.tool_call_id")) __score1++;
+ if (__jsonProps.Contains("attributes.tool_input_event_id")) __score1++;
+ if (__jsonProps.Contains("attributes.tool_key")) __score1++;
+ if (__jsonProps.Contains("attributes.tool_name")) __score1++;
+ if (__jsonProps.Contains("attributes.tool_output_event_id")) __score1++;
+ if (__jsonProps.Contains("attributes.tool_type")) __score1++;
+ if (__jsonProps.Contains("content")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.ExecuteToolTraceSpanVariant2? executeToolTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ExecuteToolTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ExecuteToolTraceSpanVariant2).Name}");
+ executeToolTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && executeToolTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ExecuteToolTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ExecuteToolTraceSpanVariant2).Name}");
+ executeToolTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.ExecuteToolTraceSpan(
+ agentBase,
+
+ executeToolTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ExecuteToolTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsExecuteToolTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ExecuteToolTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ExecuteToolTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ExecuteToolTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GuardrailTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GuardrailTraceSpan.g.cs
new file mode 100644
index 00000000..d037e707
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GuardrailTraceSpan.g.cs
@@ -0,0 +1,154 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class GuardrailTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.GuardrailTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.guardrail_passed")) __score1++;
+ if (__jsonProps.Contains("attributes.retry_attempt")) __score1++;
+ if (__jsonProps.Contains("content")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.GuardrailTraceSpanVariant2? guardrailTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GuardrailTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GuardrailTraceSpanVariant2).Name}");
+ guardrailTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && guardrailTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GuardrailTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GuardrailTraceSpanVariant2).Name}");
+ guardrailTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.GuardrailTraceSpan(
+ agentBase,
+
+ guardrailTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.GuardrailTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsGuardrailTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GuardrailTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GuardrailTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.GuardrailTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs
new file mode 100644
index 00000000..2ce20f23
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs
@@ -0,0 +1,154 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class ImageReadTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ImageReadTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.artifact_id")) __score1++;
+ if (__jsonProps.Contains("attributes.detail")) __score1++;
+ if (__jsonProps.Contains("event_id")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.ImageReadTraceSpanVariant2? imageReadTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ImageReadTraceSpanVariant2).Name}");
+ imageReadTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && imageReadTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ImageReadTraceSpanVariant2).Name}");
+ imageReadTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.ImageReadTraceSpan(
+ agentBase,
+
+ imageReadTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ImageReadTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsImageReadTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ImageReadTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageReadTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentSpanAttributesOutputType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentSpanAttributesOutputType.g.cs
new file mode 100644
index 00000000..579a5948
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentSpanAttributesOutputType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class InvokeAgentSpanAttributesOutputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.InvokeAgentSpanAttributesOutputType 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.InvokeAgentSpanAttributesOutputTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.InvokeAgentSpanAttributesOutputType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.InvokeAgentSpanAttributesOutputType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.InvokeAgentSpanAttributesOutputType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.InvokeAgentSpanAttributesOutputTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentSpanAttributesOutputTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentSpanAttributesOutputTypeNullable.g.cs
new file mode 100644
index 00000000..9abd7881
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentSpanAttributesOutputTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class InvokeAgentSpanAttributesOutputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.InvokeAgentSpanAttributesOutputType? 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.InvokeAgentSpanAttributesOutputTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.InvokeAgentSpanAttributesOutputType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.InvokeAgentSpanAttributesOutputType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.InvokeAgentSpanAttributesOutputType? 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.InvokeAgentSpanAttributesOutputTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs
new file mode 100644
index 00000000..2b6940a2
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs
@@ -0,0 +1,165 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class InvokeAgentTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.InvokeAgentTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.agent_description")) __score1++;
+ if (__jsonProps.Contains("attributes.agent_name")) __score1++;
+ if (__jsonProps.Contains("attributes.cache_read_input_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.input_event_id")) __score1++;
+ if (__jsonProps.Contains("attributes.input_files")) __score1++;
+ if (__jsonProps.Contains("attributes.input_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.max_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.model")) __score1++;
+ if (__jsonProps.Contains("attributes.output_event_id")) __score1++;
+ if (__jsonProps.Contains("attributes.output_tokens")) __score1++;
+ if (__jsonProps.Contains("attributes.output_type")) __score1++;
+ if (__jsonProps.Contains("attributes.provider_name")) __score1++;
+ if (__jsonProps.Contains("attributes.temperature")) __score1++;
+ if (__jsonProps.Contains("content")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? @base = default;
+ global::Vectara.InvokeAgentTraceSpanVariant2? invokeAgentTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InvokeAgentTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InvokeAgentTraceSpanVariant2).Name}");
+ invokeAgentTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (@base == null && invokeAgentTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InvokeAgentTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InvokeAgentTraceSpanVariant2).Name}");
+ invokeAgentTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.InvokeAgentTraceSpan(
+ @base,
+
+ invokeAgentTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.InvokeAgentTraceSpan 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.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo);
+ }
+ else if (value.IsInvokeAgentTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InvokeAgentTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InvokeAgentTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.InvokeAgentTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAgentConnectorsType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAgentConnectorsType.g.cs
new file mode 100644
index 00000000..588dea59
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAgentConnectorsType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListAgentConnectorsTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListAgentConnectorsType 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.ListAgentConnectorsTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListAgentConnectorsType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListAgentConnectorsType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListAgentConnectorsType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ListAgentConnectorsTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAgentConnectorsTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAgentConnectorsTypeNullable.g.cs
new file mode 100644
index 00000000..768d44e1
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListAgentConnectorsTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListAgentConnectorsTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListAgentConnectorsType? 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.ListAgentConnectorsTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListAgentConnectorsType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListAgentConnectorsType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListAgentConnectorsType? 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.ListAgentConnectorsTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTraceSpansOperation.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTraceSpansOperation.g.cs
new file mode 100644
index 00000000..dd66ef2d
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTraceSpansOperation.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTraceSpansOperationJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTraceSpansOperation 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.ListTraceSpansOperationExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTraceSpansOperation)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTraceSpansOperation);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTraceSpansOperation value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ListTraceSpansOperationExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTraceSpansOperationNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTraceSpansOperationNullable.g.cs
new file mode 100644
index 00000000..71e769ed
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTraceSpansOperationNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTraceSpansOperationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTraceSpansOperation? 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.ListTraceSpansOperationExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTraceSpansOperation)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTraceSpansOperation?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTraceSpansOperation? 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.ListTraceSpansOperationExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesErrorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesErrorType.g.cs
new file mode 100644
index 00000000..06393ea4
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesErrorType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesErrorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesErrorType 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.ListTracesErrorTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesErrorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesErrorType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesErrorType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ListTracesErrorTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesErrorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesErrorTypeNullable.g.cs
new file mode 100644
index 00000000..6069caae
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesErrorTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesErrorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesErrorType? 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.ListTracesErrorTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesErrorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesErrorType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesErrorType? 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.ListTracesErrorTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesOperation.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesOperation.g.cs
new file mode 100644
index 00000000..e3394bfa
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesOperation.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesOperationJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesOperation 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.ListTracesOperationExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesOperation)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesOperation);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesOperation value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ListTracesOperationExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesOperationNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesOperationNullable.g.cs
new file mode 100644
index 00000000..773062e2
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesOperationNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesOperationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesOperation? 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.ListTracesOperationExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesOperation)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesOperation?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesOperation? 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.ListTracesOperationExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesStatus.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesStatus.g.cs
new file mode 100644
index 00000000..51a47420
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesStatus 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.ListTracesStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ListTracesStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesStatusNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesStatusNullable.g.cs
new file mode 100644
index 00000000..73aa0daf
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesStatus? 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.ListTracesStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesStatus? 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.ListTracesStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesToolErrorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesToolErrorType.g.cs
new file mode 100644
index 00000000..37480ebc
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesToolErrorType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesToolErrorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesToolErrorType 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.ListTracesToolErrorTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesToolErrorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesToolErrorType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesToolErrorType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Vectara.ListTracesToolErrorTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesToolErrorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesToolErrorTypeNullable.g.cs
new file mode 100644
index 00000000..e6dfa9e7
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ListTracesToolErrorTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public sealed class ListTracesToolErrorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ListTracesToolErrorType? 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.ListTracesToolErrorTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Vectara.ListTracesToolErrorType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Vectara.ListTracesToolErrorType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ListTracesToolErrorType? 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.ListTracesToolErrorTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.OutputTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.OutputTraceSpan.g.cs
new file mode 100644
index 00000000..71f79783
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.OutputTraceSpan.g.cs
@@ -0,0 +1,145 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class OutputTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.OutputTraceSpan 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("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("content")) __score1++;
+ if (__jsonProps.Contains("event_id")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.OutputTraceSpanVariant2? outputTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OutputTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.OutputTraceSpanVariant2).Name}");
+ outputTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && outputTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OutputTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.OutputTraceSpanVariant2).Name}");
+ outputTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.OutputTraceSpan(
+ agentBase,
+
+ outputTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.OutputTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsOutputTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.OutputTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.OutputTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.StepTransitionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.StepTransitionTraceSpan.g.cs
new file mode 100644
index 00000000..5217a594
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.StepTransitionTraceSpan.g.cs
@@ -0,0 +1,154 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class StepTransitionTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.StepTransitionTraceSpan 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);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("attributes")) __score1++;
+ if (__jsonProps.Contains("attributes.from_step")) __score1++;
+ if (__jsonProps.Contains("attributes.to_step")) __score1++;
+ if (__jsonProps.Contains("event_id")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.StepTransitionTraceSpanVariant2? stepTransitionTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.StepTransitionTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.StepTransitionTraceSpanVariant2).Name}");
+ stepTransitionTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && stepTransitionTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.StepTransitionTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.StepTransitionTraceSpanVariant2).Name}");
+ stepTransitionTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.StepTransitionTraceSpan(
+ agentBase,
+
+ stepTransitionTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.StepTransitionTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsStepTransitionTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.StepTransitionTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.StepTransitionTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.StepTransitionTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs
new file mode 100644
index 00000000..9a0a8a94
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs
@@ -0,0 +1,144 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace Vectara.JsonConverters
+{
+ ///
+ public class ThinkingTraceSpanJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Vectara.ThinkingTraceSpan 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("duration_ms")) __score0++;
+ if (__jsonProps.Contains("error_message")) __score0++;
+ if (__jsonProps.Contains("parent_span_id")) __score0++;
+ if (__jsonProps.Contains("span_id")) __score0++;
+ if (__jsonProps.Contains("started_at")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("step_name")) __score0++;
+ if (__jsonProps.Contains("trace_id")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("content")) __score1++;
+ if (__jsonProps.Contains("operation")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::Vectara.AgentTraceSpanBase? agentBase = default;
+ global::Vectara.ThinkingTraceSpanVariant2? thinkingTraceSpanVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ThinkingTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ThinkingTraceSpanVariant2).Name}");
+ thinkingTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (agentBase == null && thinkingTraceSpanVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ThinkingTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ThinkingTraceSpanVariant2).Name}");
+ thinkingTraceSpanVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::Vectara.ThinkingTraceSpan(
+ agentBase,
+
+ thinkingTraceSpanVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Vectara.ThinkingTraceSpan 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.IsAgentBase)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentTraceSpanBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentTraceSpanBase).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo);
+ }
+ else if (value.IsThinkingTraceSpanVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ThinkingTraceSpanVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ThinkingTraceSpanVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThinkingTraceSpanVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs
index a6666ef2..6f78bd94 100644
--- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs
@@ -309,6 +309,22 @@ namespace Vectara
typeof(global::Vectara.JsonConverters.AgentIdentityModeNullableJsonConverter),
+ typeof(global::Vectara.JsonConverters.ConnectorConfigurationDiscriminatorTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ConnectorConfigurationDiscriminatorTypeNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentConnectorTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentConnectorTypeNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentConnectorStatusJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentConnectorStatusNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.CreateAgentConnectorRequestTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.CreateAgentConnectorRequestTypeNullableJsonConverter),
+
typeof(global::Vectara.JsonConverters.PipelineStatusJsonConverter),
typeof(global::Vectara.JsonConverters.PipelineStatusNullableJsonConverter),
@@ -353,6 +369,22 @@ namespace Vectara
typeof(global::Vectara.JsonConverters.DeadLetterOriginNullableJsonConverter),
+ typeof(global::Vectara.JsonConverters.AgentTraceStatusJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentTraceStatusNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentTraceSpanStatusJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentTraceSpanStatusNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.InvokeAgentSpanAttributesOutputTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.InvokeAgentSpanAttributesOutputTypeNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperationJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentTraceSpanDiscriminatorOperationNullableJsonConverter),
+
typeof(global::Vectara.JsonConverters.CreateCorpusDocumentWaitForJsonConverter),
typeof(global::Vectara.JsonConverters.CreateCorpusDocumentWaitForNullableJsonConverter),
@@ -377,10 +409,34 @@ namespace Vectara
typeof(global::Vectara.JsonConverters.ListSessionArtifactsOrderByNullableJsonConverter),
+ typeof(global::Vectara.JsonConverters.ListAgentConnectorsTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListAgentConnectorsTypeNullableJsonConverter),
+
typeof(global::Vectara.JsonConverters.ListPipelinesSourceTypeJsonConverter),
typeof(global::Vectara.JsonConverters.ListPipelinesSourceTypeNullableJsonConverter),
+ typeof(global::Vectara.JsonConverters.ListTracesStatusJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesStatusNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesErrorTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesErrorTypeNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesOperationJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesOperationNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesToolErrorTypeJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTracesToolErrorTypeNullableJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTraceSpansOperationJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ListTraceSpansOperationNullableJsonConverter),
+
typeof(global::Vectara.JsonConverters.ChunkingStrategyJsonConverter),
typeof(global::Vectara.JsonConverters.CreateDocumentRequestJsonConverter),
@@ -525,6 +581,8 @@ namespace Vectara
typeof(global::Vectara.JsonConverters.ScheduleConfigurationJsonConverter),
+ typeof(global::Vectara.JsonConverters.ConnectorConfigurationJsonConverter),
+
typeof(global::Vectara.JsonConverters.S3SourceConfigurationJsonConverter),
typeof(global::Vectara.JsonConverters.PipelineSourceJsonConverter),
@@ -537,6 +595,26 @@ namespace Vectara
typeof(global::Vectara.JsonConverters.UpdatePipelineSourceJsonConverter),
+ typeof(global::Vectara.JsonConverters.InvokeAgentTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ChatTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ExecuteToolTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ThinkingTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.OutputTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.GuardrailTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.StepTransitionTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.ImageReadTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.CompactionTraceSpanJsonConverter),
+
+ typeof(global::Vectara.JsonConverters.AgentTraceSpanJsonConverter),
+
typeof(global::Vectara.JsonConverters.AllOfJsonConverter),
typeof(global::Vectara.JsonConverters.OneOfJsonConverter),
@@ -980,6 +1058,7 @@ namespace Vectara
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentSessionMode), TypeInfoPropertyName = "SubAgentSessionMode2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentConfiguration))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineSubAgentToolConfiguration))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactCreateToolConfiguration))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactReadToolParameters))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactReadToolParametersEncoding), TypeInfoPropertyName = "ArtifactReadToolParametersEncoding2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactReadConfiguration))]
@@ -1135,6 +1214,18 @@ namespace Vectara
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentIdentityMode), TypeInfoPropertyName = "AgentIdentityMode2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentIdentity))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentIdentityRequest))]
+ [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))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ConnectorConfigurationDiscriminatorType), TypeInfoPropertyName = "ConnectorConfigurationDiscriminatorType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentConnector))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentConnectorType), TypeInfoPropertyName = "AgentConnectorType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentConnectorStatus), TypeInfoPropertyName = "AgentConnectorStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentConnectorsResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [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.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")]
@@ -1179,6 +1270,50 @@ namespace Vectara
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ProcessPipelineDeadLetterEntriesRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListPipelineRunsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTrace))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceStatus), TypeInfoPropertyName = "AgentTraceStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentTracesResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceSpanStatus), TypeInfoPropertyName = "AgentTraceSpanStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceSpanBase))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceInputFile))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InvokeAgentSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InvokeAgentSpanAttributesOutputType), TypeInfoPropertyName = "InvokeAgentSpanAttributesOutputType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InvokeAgentSpanContent))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InvokeAgentTraceSpan), TypeInfoPropertyName = "InvokeAgentTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InvokeAgentTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ChatSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ChatTraceSpan), TypeInfoPropertyName = "ChatTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ChatTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ExecuteToolSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ExecuteToolSpanContent))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ExecuteToolTraceSpan), TypeInfoPropertyName = "ExecuteToolTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ExecuteToolTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ThinkingSpanContent))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ThinkingTraceSpan), TypeInfoPropertyName = "ThinkingTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ThinkingTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OutputSpanContent))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OutputTraceSpan), TypeInfoPropertyName = "OutputTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OutputTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GuardrailSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GuardrailSpanContent))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GuardrailTraceSpan), TypeInfoPropertyName = "GuardrailTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GuardrailTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.StepTransitionSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.StepTransitionTraceSpan), TypeInfoPropertyName = "StepTransitionTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.StepTransitionTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadTraceSpan), TypeInfoPropertyName = "ImageReadTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionSpanAttributes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionTraceSpan), TypeInfoPropertyName = "CompactionTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionTraceSpanVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceSpan), TypeInfoPropertyName = "AgentTraceSpan2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceSpanDiscriminator))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentTraceSpanDiscriminatorOperation), TypeInfoPropertyName = "AgentTraceSpanDiscriminatorOperation2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentTraceSpansResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.Glossary))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListGlossariesResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
@@ -1197,7 +1332,13 @@ namespace Vectara
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListInstructionsType), TypeInfoPropertyName = "ListInstructionsType2")]
[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.ListPipelinesSourceType), TypeInfoPropertyName = "ListPipelinesSourceType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListTracesStatus), TypeInfoPropertyName = "ListTracesStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListTracesErrorType), TypeInfoPropertyName = "ListTracesErrorType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListTracesOperation), TypeInfoPropertyName = "ListTracesOperation2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListTracesToolErrorType), TypeInfoPropertyName = "ListTracesToolErrorType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListTraceSpansOperation), TypeInfoPropertyName = "ListTraceSpansOperation2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AllOf), TypeInfoPropertyName = "AllOfUserCreateUserResponse22")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateUserResponse2))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ResetUserPasswordResponse))]
@@ -1266,9 +1407,13 @@ namespace Vectara
[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))]
[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))]
diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs
index 7565b2ff..23364c75 100644
--- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs
@@ -1684,891 +1684,1143 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Vectara.ArtifactReadToolParameters? Type414 { get; set; }
+ public global::Vectara.InlineArtifactCreateToolConfiguration? Type414 { get; set; }
///
///
///
- public global::Vectara.ArtifactReadToolParametersEncoding? Type415 { get; set; }
+ public global::Vectara.ArtifactReadToolParameters? Type415 { get; set; }
///
///
///
- public global::Vectara.ArtifactReadConfiguration? Type416 { get; set; }
+ public global::Vectara.ArtifactReadToolParametersEncoding? Type416 { get; set; }
///
///
///
- public global::Vectara.InlineArtifactReadToolConfiguration? Type417 { get; set; }
+ public global::Vectara.ArtifactReadConfiguration? Type417 { get; set; }
///
///
///
- public global::Vectara.ArtifactGrepToolParameters? Type418 { get; set; }
+ public global::Vectara.InlineArtifactReadToolConfiguration? Type418 { get; set; }
///
///
///
- public global::Vectara.InlineArtifactGrepToolConfiguration? Type419 { get; set; }
+ public global::Vectara.ArtifactGrepToolParameters? Type419 { get; set; }
///
///
///
- public global::Vectara.ImageReadToolParameters? Type420 { get; set; }
+ public global::Vectara.InlineArtifactGrepToolConfiguration? Type420 { get; set; }
///
///
///
- public global::Vectara.ImageReadToolParametersDetail? Type421 { get; set; }
+ public global::Vectara.ImageReadToolParameters? Type421 { get; set; }
///
///
///
- public global::Vectara.InlineImageReadToolConfiguration? Type422 { get; set; }
+ public global::Vectara.ImageReadToolParametersDetail? Type422 { get; set; }
///
///
///
- public global::Vectara.DocumentConversionToolParameters? Type423 { get; set; }
+ public global::Vectara.InlineImageReadToolConfiguration? Type423 { get; set; }
///
///
///
- public global::Vectara.DocumentConversionToolParametersOutputFormat? Type424 { get; set; }
+ public global::Vectara.DocumentConversionToolParameters? Type424 { get; set; }
///
///
///
- public global::Vectara.InlineDocumentConversionToolConfiguration? Type425 { get; set; }
+ public global::Vectara.DocumentConversionToolParametersOutputFormat? Type425 { get; set; }
///
///
///
- public global::Vectara.GetDocumentTextParameters? Type426 { get; set; }
+ public global::Vectara.InlineDocumentConversionToolConfiguration? Type426 { get; set; }
///
///
///
- public global::Vectara.GetDocumentTextConfiguration? Type427 { get; set; }
+ public global::Vectara.GetDocumentTextParameters? Type427 { get; set; }
///
///
///
- public global::Vectara.GetDocumentTextConfigurationMetadata? Type428 { get; set; }
+ public global::Vectara.GetDocumentTextConfiguration? Type428 { get; set; }
///
///
///
- public global::Vectara.InlineGetDocumentTextToolConfiguration? Type429 { get; set; }
+ public global::Vectara.GetDocumentTextConfigurationMetadata? Type429 { get; set; }
///
///
///
- public global::Vectara.AgentToolConfiguration? Type430 { get; set; }
+ public global::Vectara.InlineGetDocumentTextToolConfiguration? Type430 { get; set; }
///
///
///
- public global::Vectara.AgentToolConfigurationDiscriminator? Type431 { get; set; }
+ public global::Vectara.AgentToolConfiguration? Type431 { get; set; }
///
///
///
- public global::Vectara.AgentToolConfigurationDiscriminatorType? Type432 { get; set; }
+ public global::Vectara.AgentToolConfigurationDiscriminator? Type432 { get; set; }
///
///
///
- public global::Vectara.AgentSkill? Type433 { get; set; }
+ public global::Vectara.AgentToolConfigurationDiscriminatorType? Type433 { get; set; }
///
///
///
- public global::Vectara.RetryConfiguration? Type434 { get; set; }
+ public global::Vectara.AgentSkill? Type434 { get; set; }
///
///
///
- public global::Vectara.AgentModel? Type435 { get; set; }
+ public global::Vectara.RetryConfiguration? Type435 { get; set; }
///
///
///
- public global::Vectara.InstructionReference? Type436 { get; set; }
+ public global::Vectara.AgentModel? Type436 { get; set; }
///
///
///
- public global::Vectara.ReferenceInstruction? Type437 { get; set; }
+ public global::Vectara.InstructionReference? Type437 { get; set; }
///
///
///
- public global::Vectara.ReferenceInstructionVariant2? Type438 { get; set; }
+ public global::Vectara.ReferenceInstruction? Type438 { get; set; }
///
///
///
- public global::Vectara.InlineInstruction? Type439 { get; set; }
+ public global::Vectara.ReferenceInstructionVariant2? Type439 { get; set; }
///
///
///
- public global::Vectara.InlineInstructionVariant2? Type440 { get; set; }
+ public global::Vectara.InlineInstruction? Type440 { get; set; }
///
///
///
- public global::Vectara.AgentStepInstruction? Type441 { get; set; }
+ public global::Vectara.InlineInstructionVariant2? Type441 { get; set; }
///
///
///
- public global::Vectara.AgentStepInstructionDiscriminator? Type442 { get; set; }
+ public global::Vectara.AgentStepInstruction? Type442 { get; set; }
///
///
///
- public global::Vectara.AgentStepInstructionDiscriminatorType? Type443 { get; set; }
+ public global::Vectara.AgentStepInstructionDiscriminator? Type443 { get; set; }
///
///
///
- public global::Vectara.DefaultOutputParser? Type444 { get; set; }
+ public global::Vectara.AgentStepInstructionDiscriminatorType? Type444 { get; set; }
///
///
///
- public global::Vectara.StructuredOutputParser? Type445 { get; set; }
+ public global::Vectara.DefaultOutputParser? Type445 { get; set; }
///
///
///
- public global::Vectara.AgentOutputParser? Type446 { get; set; }
+ public global::Vectara.StructuredOutputParser? Type446 { get; set; }
///
///
///
- public global::Vectara.AgentOutputParserDiscriminator? Type447 { get; set; }
+ public global::Vectara.AgentOutputParser? Type447 { get; set; }
///
///
///
- public global::Vectara.AgentOutputParserDiscriminatorType? Type448 { get; set; }
+ public global::Vectara.AgentOutputParserDiscriminator? Type448 { get; set; }
///
///
///
- public global::Vectara.TemplatedReminder? Type449 { get; set; }
+ public global::Vectara.AgentOutputParserDiscriminatorType? Type449 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type450 { get; set; }
+ public global::Vectara.TemplatedReminder? Type450 { get; set; }
///
///
///
- public global::Vectara.TemplatedReminderHook? Type451 { get; set; }
+ public global::System.Collections.Generic.IList? Type451 { get; set; }
///
///
///
- public global::Vectara.GlossaryExpansionReminder? Type452 { get; set; }
+ public global::Vectara.TemplatedReminderHook? Type452 { get; set; }
///
///
///
- public global::Vectara.AgentStepReminder? Type453 { get; set; }
+ public global::Vectara.GlossaryExpansionReminder? Type453 { get; set; }
///
///
///
- public global::Vectara.AgentStepReminderDiscriminator? Type454 { get; set; }
+ public global::Vectara.AgentStepReminder? Type454 { get; set; }
///
///
///
- public global::Vectara.AgentStepReminderDiscriminatorType? Type455 { get; set; }
+ public global::Vectara.AgentStepReminderDiscriminator? Type455 { get; set; }
///
///
///
- public global::Vectara.NextStep? Type456 { get; set; }
+ public global::Vectara.AgentStepReminderDiscriminatorType? Type456 { get; set; }
///
///
///
- public global::Vectara.FirstAgentStep? Type457 { get; set; }
+ public global::Vectara.NextStep? Type457 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type458 { get; set; }
+ public global::Vectara.FirstAgentStep? Type458 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type459 { get; set; }
+ public global::System.Collections.Generic.IList? Type459 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type460 { get; set; }
+ public global::System.Collections.Generic.IList? Type460 { get; set; }
///
///
///
- public global::Vectara.AgentStep? Type461 { get; set; }
+ public global::System.Collections.Generic.IList? Type461 { get; set; }
///
///
///
- public global::Vectara.CompactionConfig? Type462 { get; set; }
+ public global::Vectara.AgentStep? Type462 { get; set; }
///
///
///
- public global::Vectara.CompactionConfigToolEventPolicy? Type463 { get; set; }
+ public global::Vectara.CompactionConfig? Type463 { get; set; }
///
///
///
- public global::Vectara.ToolOutputOffloadingConfiguration? Type464 { get; set; }
+ public global::Vectara.CompactionConfigToolEventPolicy? Type464 { get; set; }
///
///
///
- public global::Vectara.Agent? Type465 { get; set; }
+ public global::Vectara.ToolOutputOffloadingConfiguration? Type465 { get; set; }
///
///
///
- public global::System.Collections.Generic.Dictionary? Type466 { get; set; }
+ public global::Vectara.Agent? Type466 { get; set; }
///
///
///
- public global::System.Collections.Generic.Dictionary? Type467 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type467 { get; set; }
///
///
///
- public global::Vectara.ListAgentsResponse? Type468 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type468 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type469 { get; set; }
+ public global::Vectara.ListAgentsResponse? Type469 { get; set; }
///
///
///
- public global::Vectara.CreateAgentRequest? Type470 { get; set; }
+ public global::System.Collections.Generic.IList? Type470 { get; set; }
///
///
///
- public global::Vectara.UpdateFirstAgentStep? Type471 { get; set; }
+ public global::Vectara.CreateAgentRequest? Type471 { get; set; }
///
///
///
- public global::Vectara.UpdateAgentStep? Type472 { get; set; }
+ public global::Vectara.UpdateFirstAgentStep? Type472 { get; set; }
///
///
///
- public global::Vectara.UpdateAgentRequest? Type473 { get; set; }
+ public global::Vectara.UpdateAgentStep? Type473 { get; set; }
///
///
///
- public global::System.Collections.Generic.Dictionary? Type474 { get; set; }
+ public global::Vectara.UpdateAgentRequest? Type474 { get; set; }
///
///
///
- public global::Vectara.InputTokens? Type475 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type475 { get; set; }
///
///
///
- public global::Vectara.OutputTokens? Type476 { get; set; }
+ public global::Vectara.InputTokens? Type476 { get; set; }
///
///
///
- public global::Vectara.SessionContextUsage? Type477 { get; set; }
+ public global::Vectara.OutputTokens? Type477 { get; set; }
///
///
///
- public global::Vectara.AgentSession? Type478 { get; set; }
+ public global::Vectara.SessionContextUsage? Type478 { get; set; }
///
///
///
- public global::Vectara.ListAgentSessionsResponse? Type479 { get; set; }
+ public global::Vectara.AgentSession? Type479 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type480 { get; set; }
+ public global::Vectara.ListAgentSessionsResponse? Type480 { get; set; }
///
///
///
- public global::Vectara.CreateAgentSessionRequest? Type481 { get; set; }
+ public global::System.Collections.Generic.IList? Type481 { get; set; }
///
///
///
- public global::Vectara.CreateAgentSessionRequestFromSession? Type482 { get; set; }
+ public global::Vectara.CreateAgentSessionRequest? Type482 { get; set; }
///
///
///
- public global::Vectara.UpdateAgentSessionRequest? Type483 { get; set; }
+ public global::Vectara.CreateAgentSessionRequestFromSession? Type483 { get; set; }
///
///
///
- public global::Vectara.AgentEventBase? Type484 { get; set; }
+ public global::Vectara.UpdateAgentSessionRequest? Type484 { get; set; }
///
///
///
- public global::Vectara.AgentTextInput? Type485 { get; set; }
+ public global::Vectara.AgentEventBase? Type485 { get; set; }
///
///
///
- public global::Vectara.AgentSkillInput? Type486 { get; set; }
+ public global::Vectara.AgentTextInput? Type486 { get; set; }
///
///
///
- public global::Vectara.AgentInput? Type487 { get; set; }
+ public global::Vectara.AgentSkillInput? Type487 { get; set; }
///
///
///
- public global::Vectara.AgentInputDiscriminator? Type488 { get; set; }
+ public global::Vectara.AgentInput? Type488 { get; set; }
///
///
///
- public global::Vectara.AgentInputDiscriminatorType? Type489 { get; set; }
+ public global::Vectara.AgentInputDiscriminator? Type489 { get; set; }
///
///
///
- public global::Vectara.InputMessageEvent? Type490 { get; set; }
+ public global::Vectara.AgentInputDiscriminatorType? Type490 { get; set; }
///
///
///
- public global::Vectara.InputMessageEventVariant2? Type491 { get; set; }
+ public global::Vectara.InputMessageEvent? Type491 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type492 { get; set; }
+ public global::Vectara.InputMessageEventVariant2? Type492 { get; set; }
///
///
///
- public global::Vectara.SkillLoadEvent? Type493 { get; set; }
+ public global::System.Collections.Generic.IList? Type493 { get; set; }
///
///
///
- public global::Vectara.SkillLoadEventVariant2? Type494 { get; set; }
+ public global::Vectara.SkillLoadEvent? Type494 { get; set; }
///
///
///
- public global::Vectara.ArtifactReference? Type495 { get; set; }
+ public global::Vectara.SkillLoadEventVariant2? Type495 { get; set; }
///
///
///
- public global::Vectara.ArtifactUploadEvent? Type496 { get; set; }
+ public global::Vectara.ArtifactReference? Type496 { get; set; }
///
///
///
- public global::Vectara.ArtifactUploadEventVariant2? Type497 { get; set; }
+ public global::Vectara.ArtifactUploadEvent? Type497 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type498 { get; set; }
+ public global::Vectara.ArtifactUploadEventVariant2? Type498 { get; set; }
///
///
///
- public global::Vectara.ToolInputEvent? Type499 { get; set; }
+ public global::System.Collections.Generic.IList? Type499 { get; set; }
///
///
///
- public global::Vectara.ToolInputEventVariant2? Type500 { get; set; }
+ public global::Vectara.ToolInputEvent? Type500 { get; set; }
///
///
///
- public global::Vectara.ToolOutputEvent? Type501 { get; set; }
+ public global::Vectara.ToolInputEventVariant2? Type501 { get; set; }
///
///
///
- public global::Vectara.ToolOutputEventVariant2? Type502 { get; set; }
+ public global::Vectara.ToolOutputEvent? Type502 { get; set; }
///
///
///
- public global::Vectara.ThinkingEvent? Type503 { get; set; }
+ public global::Vectara.ToolOutputEventVariant2? Type503 { get; set; }
///
///
///
- public global::Vectara.ThinkingEventVariant2? Type504 { get; set; }
+ public global::Vectara.ThinkingEvent? Type504 { get; set; }
///
///
///
- public global::Vectara.AgentOutputEvent? Type505 { get; set; }
+ public global::Vectara.ThinkingEventVariant2? Type505 { get; set; }
///
///
///
- public global::Vectara.AgentOutputEventVariant2? Type506 { get; set; }
+ public global::Vectara.AgentOutputEvent? Type506 { get; set; }
///
///
///
- public global::Vectara.StructuredOutputEvent? Type507 { get; set; }
+ public global::Vectara.AgentOutputEventVariant2? Type507 { get; set; }
///
///
///
- public global::Vectara.StructuredOutputEventVariant2? Type508 { get; set; }
+ public global::Vectara.StructuredOutputEvent? Type508 { get; set; }
///
///
///
- public global::Vectara.ContextLimitExceededEvent? Type509 { get; set; }
+ public global::Vectara.StructuredOutputEventVariant2? Type509 { get; set; }
///
///
///
- public global::Vectara.ContextLimitExceededEventVariant2? Type510 { get; set; }
+ public global::Vectara.ContextLimitExceededEvent? Type510 { get; set; }
///
///
///
- public global::Vectara.StepTransitionLimitExceededEvent? Type511 { get; set; }
+ public global::Vectara.ContextLimitExceededEventVariant2? Type511 { get; set; }
///
///
///
- public global::Vectara.StepTransitionLimitExceededEventVariant2? Type512 { get; set; }
+ public global::Vectara.StepTransitionLimitExceededEvent? Type512 { get; set; }
///
///
///
- public global::Vectara.SessionInterruptedEvent? Type513 { get; set; }
+ public global::Vectara.StepTransitionLimitExceededEventVariant2? Type513 { get; set; }
///
///
///
- public global::Vectara.SessionInterruptedEventVariant2? Type514 { get; set; }
+ public global::Vectara.SessionInterruptedEvent? Type514 { get; set; }
///
///
///
- public global::Vectara.ImageReadEvent? Type515 { get; set; }
+ public global::Vectara.SessionInterruptedEventVariant2? Type515 { get; set; }
///
///
///
- public global::Vectara.ImageReadEventVariant2? Type516 { get; set; }
+ public global::Vectara.ImageReadEvent? Type516 { get; set; }
///
///
///
- public global::Vectara.ImageReadEventVariant2Detail? Type517 { get; set; }
+ public global::Vectara.ImageReadEventVariant2? Type517 { get; set; }
///
///
///
- public global::Vectara.StepTransitionEvent? Type518 { get; set; }
+ public global::Vectara.ImageReadEventVariant2Detail? Type518 { get; set; }
///
///
///
- public global::Vectara.StepTransitionEventVariant2? Type519 { get; set; }
+ public global::Vectara.StepTransitionEvent? Type519 { get; set; }
///
///
///
- public global::Vectara.CompactionEvent? Type520 { get; set; }
+ public global::Vectara.StepTransitionEventVariant2? Type520 { get; set; }
///
///
///
- public global::Vectara.CompactionEventVariant2? Type521 { get; set; }
+ public global::Vectara.CompactionEvent? Type521 { get; set; }
///
///
///
- public global::Vectara.AgentEvent? Type522 { get; set; }
+ public global::Vectara.CompactionEventVariant2? Type522 { get; set; }
///
///
///
- public global::Vectara.AgentEventDiscriminator? Type523 { get; set; }
+ public global::Vectara.AgentEvent? Type523 { get; set; }
///
///
///
- public global::Vectara.AgentEventDiscriminatorType? Type524 { get; set; }
+ public global::Vectara.AgentEventDiscriminator? Type524 { get; set; }
///
///
///
- public global::Vectara.ListAgentEventsResponse? Type525 { get; set; }
+ public global::Vectara.AgentEventDiscriminatorType? Type525 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type526 { get; set; }
+ public global::Vectara.ListAgentEventsResponse? Type526 { get; set; }
///
///
///
- public global::Vectara.CreateInputRequestBase? Type527 { get; set; }
+ public global::System.Collections.Generic.IList? Type527 { get; set; }
///
///
///
- public global::Vectara.InputBehavior? Type528 { get; set; }
+ public global::Vectara.CreateInputRequestBase? Type528 { get; set; }
///
///
///
- public global::Vectara.CreateInputMessageRequest? Type529 { get; set; }
+ public global::Vectara.InputBehavior? Type529 { get; set; }
///
///
///
- public global::Vectara.CreateInputMessageRequestVariant2? Type530 { get; set; }
+ public global::Vectara.CreateInputMessageRequest? Type530 { get; set; }
///
///
///
- public global::Vectara.CreateInterruptRequest? Type531 { get; set; }
+ public global::Vectara.CreateInputMessageRequestVariant2? Type531 { get; set; }
///
///
///
- public global::Vectara.CreateInterruptRequestVariant2? Type532 { get; set; }
+ public global::Vectara.CreateInterruptRequest? Type532 { get; set; }
///
///
///
- public global::Vectara.CreateCompactRequest? Type533 { get; set; }
+ public global::Vectara.CreateInterruptRequestVariant2? Type533 { get; set; }
///
///
///
- public global::Vectara.CreateCompactRequestVariant2? Type534 { get; set; }
+ public global::Vectara.CreateCompactRequest? Type534 { get; set; }
///
///
///
- public global::Vectara.CreateInputRequest? Type535 { get; set; }
+ public global::Vectara.CreateCompactRequestVariant2? Type535 { get; set; }
///
///
///
- public global::Vectara.CreateInputRequestDiscriminator? Type536 { get; set; }
+ public global::Vectara.CreateInputRequest? Type536 { get; set; }
///
///
///
- public global::Vectara.CreateInputRequestDiscriminatorType? Type537 { get; set; }
+ public global::Vectara.CreateInputRequestDiscriminator? Type537 { get; set; }
///
///
///
- public global::Vectara.AgentResponse? Type538 { get; set; }
+ public global::Vectara.CreateInputRequestDiscriminatorType? Type538 { get; set; }
///
///
///
- public global::Vectara.StreamingAgentOutput? Type539 { get; set; }
+ public global::Vectara.AgentResponse? Type539 { get; set; }
///
///
///
- public global::Vectara.StreamingAgentOutputEnd? Type540 { get; set; }
+ public global::Vectara.StreamingAgentOutput? Type540 { get; set; }
///
///
///
- public global::Vectara.StreamingThinking? Type541 { get; set; }
+ public global::Vectara.StreamingAgentOutputEnd? Type541 { get; set; }
///
///
///
- public global::Vectara.StreamingThinkingEnd? Type542 { get; set; }
+ public global::Vectara.StreamingThinking? Type542 { get; set; }
///
///
///
- public global::Vectara.ContextConsumedEvent? Type543 { get; set; }
+ public global::Vectara.StreamingThinkingEnd? Type543 { get; set; }
///
///
///
- public global::Vectara.CompactionStartedEvent? Type544 { get; set; }
+ public global::Vectara.ContextConsumedEvent? Type544 { get; set; }
///
///
///
- public global::Vectara.CompactionStartedEventVariant2? Type545 { get; set; }
+ public global::Vectara.CompactionStartedEvent? Type545 { get; set; }
///
///
///
- public global::Vectara.AgentStreamedResponse? Type546 { get; set; }
+ public global::Vectara.CompactionStartedEventVariant2? Type546 { get; set; }
///
///
///
- public global::Vectara.AgentStreamedResponseDiscriminator? Type547 { get; set; }
+ public global::Vectara.AgentStreamedResponse? Type547 { get; set; }
///
///
///
- public global::Vectara.AgentStreamedResponseDiscriminatorType? Type548 { get; set; }
+ public global::Vectara.AgentStreamedResponseDiscriminator? Type548 { get; set; }
///
///
///
- public global::Vectara.SessionArtifact? Type549 { get; set; }
+ public global::Vectara.AgentStreamedResponseDiscriminatorType? Type549 { get; set; }
///
///
///
- public global::Vectara.ListSessionArtifactsResponse? Type550 { get; set; }
+ public global::Vectara.SessionArtifact? Type550 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type551 { get; set; }
+ public global::Vectara.ListSessionArtifactsResponse? Type551 { get; set; }
///
///
///
- public global::Vectara.IntervalScheduleConfiguration? Type552 { get; set; }
+ public global::System.Collections.Generic.IList? Type552 { get; set; }
///
///
///
- public global::Vectara.IntervalScheduleConfigurationType? Type553 { get; set; }
+ public global::Vectara.IntervalScheduleConfiguration? Type553 { get; set; }
///
///
///
- public global::Vectara.CronScheduleConfiguration? Type554 { get; set; }
+ public global::Vectara.IntervalScheduleConfigurationType? Type554 { get; set; }
///
///
///
- public global::Vectara.CronScheduleConfigurationType? Type555 { get; set; }
+ public global::Vectara.CronScheduleConfiguration? Type555 { get; set; }
///
///
///
- public global::Vectara.ScheduleConfiguration? Type556 { get; set; }
+ public global::Vectara.CronScheduleConfigurationType? Type556 { get; set; }
///
///
///
- public global::Vectara.AgentSchedule? Type557 { get; set; }
+ public global::Vectara.ScheduleConfiguration? Type557 { get; set; }
///
///
///
- public global::Vectara.ListAgentSchedulesResponse? Type558 { get; set; }
+ public global::Vectara.AgentSchedule? Type558 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type559 { get; set; }
+ public global::Vectara.ListAgentSchedulesResponse? Type559 { get; set; }
///
///
///
- public global::Vectara.CreateAgentScheduleRequest? Type560 { get; set; }
+ public global::System.Collections.Generic.IList? Type560 { get; set; }
///
///
///
- public global::Vectara.UpdateAgentScheduleRequest? Type561 { get; set; }
+ public global::Vectara.CreateAgentScheduleRequest? Type561 { get; set; }
///
///
///
- public global::Vectara.AgentScheduleExecution? Type562 { get; set; }
+ public global::Vectara.UpdateAgentScheduleRequest? Type562 { get; set; }
///
///
///
- public global::Vectara.AgentScheduleExecutionStatus? Type563 { get; set; }
+ public global::Vectara.AgentScheduleExecution? Type563 { get; set; }
///
///
///
- public global::Vectara.ListAgentScheduleExecutionsResponse? Type564 { get; set; }
+ public global::Vectara.AgentScheduleExecutionStatus? Type564 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type565 { get; set; }
+ public global::Vectara.ListAgentScheduleExecutionsResponse? Type565 { get; set; }
///
///
///
- public global::Vectara.AgentIdentityMode? Type566 { get; set; }
+ public global::System.Collections.Generic.IList? Type566 { get; set; }
///
///
///
- public global::Vectara.AgentIdentity? Type567 { get; set; }
+ public global::Vectara.AgentIdentityMode? Type567 { get; set; }
///
///
///
- public global::Vectara.UpdateAgentIdentityRequest? Type568 { get; set; }
+ public global::Vectara.AgentIdentity? Type568 { get; set; }
///
///
///
- public global::Vectara.PipelineStatus? Type569 { get; set; }
+ public global::Vectara.UpdateAgentIdentityRequest? Type569 { get; set; }
///
///
///
- public global::Vectara.BaseS3SourceConfiguration? Type570 { get; set; }
+ public global::Vectara.SlackConnectorConfiguration? Type570 { get; set; }
///
///
///
- public global::Vectara.S3SourceConfiguration? Type571 { get; set; }
+ public global::Vectara.ConnectorConfiguration? Type571 { get; set; }
///
///
///
- public global::Vectara.PipelineSource? Type572 { get; set; }
+ public global::Vectara.ConnectorConfigurationDiscriminator? Type572 { get; set; }
///
///
///
- public global::Vectara.PipelineSourceDiscriminator? Type573 { get; set; }
+ public global::Vectara.ConnectorConfigurationDiscriminatorType? Type573 { get; set; }
///
///
///
- public global::Vectara.PipelineSourceDiscriminatorType? Type574 { get; set; }
+ public global::Vectara.AgentConnector? Type574 { get; set; }
///
///
///
- public global::Vectara.CronTriggerConfiguration? Type575 { get; set; }
+ public global::Vectara.AgentConnectorType? Type575 { get; set; }
///
///
///
- public global::Vectara.IntervalTriggerConfiguration? Type576 { get; set; }
+ public global::Vectara.AgentConnectorStatus? Type576 { get; set; }
///
///
///
- public global::Vectara.ManualTriggerConfiguration? Type577 { get; set; }
+ public global::Vectara.ListAgentConnectorsResponse? Type577 { get; set; }
///
///
///
- public global::Vectara.PipelineTrigger? Type578 { get; set; }
+ public global::System.Collections.Generic.IList? Type578 { get; set; }
///
///
///
- public global::Vectara.PipelineTriggerDiscriminator? Type579 { get; set; }
+ public global::Vectara.CreateAgentConnectorRequest? Type579 { get; set; }
///
///
///
- public global::Vectara.PipelineTriggerDiscriminatorType? Type580 { get; set; }
+ public global::Vectara.CreateAgentConnectorRequestType? Type580 { get; set; }
///
///
///
- public global::Vectara.ConditionVerification? Type581 { get; set; }
+ public global::Vectara.UpdateAgentConnectorRequest? Type581 { get; set; }
///
///
///
- public global::Vectara.AgentVerification? Type582 { get; set; }
+ public global::Vectara.PipelineStatus? Type582 { get; set; }
///
///
///
- public global::Vectara.PipelineVerification? Type583 { get; set; }
+ public global::Vectara.BaseS3SourceConfiguration? Type583 { get; set; }
///
///
///
- public global::Vectara.PipelineVerificationDiscriminator? Type584 { get; set; }
+ public global::Vectara.S3SourceConfiguration? Type584 { get; set; }
///
///
///
- public global::Vectara.PipelineVerificationDiscriminatorType? Type585 { get; set; }
+ public global::Vectara.PipelineSource? Type585 { get; set; }
///
///
///
- public global::Vectara.AgentTransformConfiguration? Type586 { get; set; }
+ public global::Vectara.PipelineSourceDiscriminator? Type586 { get; set; }
///
///
///
- public global::Vectara.PipelineTransform? Type587 { get; set; }
+ public global::Vectara.PipelineSourceDiscriminatorType? Type587 { get; set; }
///
///
///
- public global::Vectara.PipelineTransformDiscriminator? Type588 { get; set; }
+ public global::Vectara.CronTriggerConfiguration? Type588 { get; set; }
///
///
///
- public global::Vectara.PipelineTransformDiscriminatorType? Type589 { get; set; }
+ public global::Vectara.IntervalTriggerConfiguration? Type589 { get; set; }
///
///
///
- public global::Vectara.PipelineSyncMode? Type590 { get; set; }
+ public global::Vectara.ManualTriggerConfiguration? Type590 { get; set; }
///
///
///
- public global::Vectara.PipelineWatermark? Type591 { get; set; }
+ public global::Vectara.PipelineTrigger? Type591 { get; set; }
///
///
///
- public global::Vectara.Pipeline? Type592 { get; set; }
+ public global::Vectara.PipelineTriggerDiscriminator? Type592 { get; set; }
///
///
///
- public global::Vectara.ListPipelinesResponse? Type593 { get; set; }
+ public global::Vectara.PipelineTriggerDiscriminatorType? Type593 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type594 { get; set; }
+ public global::Vectara.ConditionVerification? Type594 { get; set; }
///
///
///
- public global::Vectara.CreatePipelineRequest? Type595 { get; set; }
+ public global::Vectara.AgentVerification? Type595 { get; set; }
///
///
///
- public global::Vectara.UpdateS3SourceConfiguration? Type596 { get; set; }
+ public global::Vectara.PipelineVerification? Type596 { get; set; }
///
///
///
- public global::Vectara.UpdatePipelineSource? Type597 { get; set; }
+ public global::Vectara.PipelineVerificationDiscriminator? Type597 { get; set; }
///
///
///
- public global::Vectara.UpdatePipelineSourceDiscriminator? Type598 { get; set; }
+ public global::Vectara.PipelineVerificationDiscriminatorType? Type598 { get; set; }
///
///
///
- public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type599 { get; set; }
+ public global::Vectara.AgentTransformConfiguration? Type599 { get; set; }
///
///
///
- public global::Vectara.UpdatePipelineRequest? Type600 { get; set; }
+ public global::Vectara.PipelineTransform? Type600 { get; set; }
///
///
///
- public global::Vectara.PipelineRunStatus? Type601 { get; set; }
+ public global::Vectara.PipelineTransformDiscriminator? Type601 { get; set; }
///
///
///
- public global::Vectara.PipelineRunTriggerType? Type602 { get; set; }
+ public global::Vectara.PipelineTransformDiscriminatorType? Type602 { get; set; }
///
///
///
- public global::Vectara.PipelineRun? Type603 { get; set; }
+ public global::Vectara.PipelineSyncMode? Type603 { get; set; }
///
///
///
- public global::Vectara.DeadLetterStatus? Type604 { get; set; }
+ public global::Vectara.PipelineWatermark? Type604 { get; set; }
///
///
///
- public global::Vectara.DeadLetterOrigin? Type605 { get; set; }
+ public global::Vectara.Pipeline? Type605 { get; set; }
///
///
///
- public global::Vectara.PipelineDeadLetterEntry? Type606 { get; set; }
+ public global::Vectara.ListPipelinesResponse? Type606 { get; set; }
///
///
///
- public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type607 { get; set; }
+ public global::System.Collections.Generic.IList? Type607 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type608 { get; set; }
+ public global::Vectara.CreatePipelineRequest? Type608 { get; set; }
///
///
///
- public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type609 { get; set; }
+ public global::Vectara.UpdateS3SourceConfiguration? Type609 { get; set; }
///
///
///
- public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type610 { get; set; }
+ public global::Vectara.UpdatePipelineSource? Type610 { get; set; }
///
///
///
- public global::Vectara.ListPipelineRunsResponse? Type611 { get; set; }
+ public global::Vectara.UpdatePipelineSourceDiscriminator? Type611 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type612 { get; set; }
+ public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type612 { get; set; }
///
///
///
- public global::Vectara.Glossary? Type613 { get; set; }
+ public global::Vectara.UpdatePipelineRequest? Type613 { get; set; }
///
///
///
- public global::Vectara.ListGlossariesResponse? Type614 { get; set; }
+ public global::Vectara.PipelineRunStatus? Type614 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type615 { get; set; }
+ public global::Vectara.PipelineRunTriggerType? Type615 { get; set; }
///
///
///
- public global::Vectara.CreateGlossaryRequest? Type616 { get; set; }
+ public global::Vectara.PipelineRun? Type616 { get; set; }
///
///
///
- public global::Vectara.UpdateGlossaryRequest? Type617 { get; set; }
+ public global::Vectara.DeadLetterStatus? Type617 { get; set; }
///
///
///
- public global::Vectara.GlossaryEntry? Type618 { get; set; }
+ public global::Vectara.DeadLetterOrigin? Type618 { get; set; }
///
///
///
- public global::Vectara.GlossaryEntriesResponse? Type619 { get; set; }
+ public global::Vectara.PipelineDeadLetterEntry? Type619 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type620 { get; set; }
+ public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type620 { get; set; }
///
///
///
- public global::Vectara.UpsertGlossaryEntriesRequest? Type621 { get; set; }
+ public global::System.Collections.Generic.IList? Type621 { get; set; }
///
///
///
- public global::Vectara.DeleteGlossaryEntriesRequest? Type622 { get; set; }
+ public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type622 { get; set; }
///
///
///
- public global::Vectara.GetOAuthTokenRequest? Type623 { get; set; }
+ public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type623 { get; set; }
///
///
///
- public global::Vectara.CreateCorpusDocumentWaitFor? Type624 { get; set; }
+ public global::Vectara.ListPipelineRunsResponse? Type624 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type625 { get; set; }
+ public global::System.Collections.Generic.IList? Type625 { get; set; }
///
///
///
- public global::Vectara.ListToolServersType? Type626 { get; set; }
+ public global::Vectara.AgentTrace? Type626 { get; set; }
///
///
///
- public global::Vectara.ListToolsType? Type627 { get; set; }
+ public global::Vectara.AgentTraceStatus? Type627 { get; set; }
///
///
///
- public global::Vectara.ListInstructionsType? Type628 { get; set; }
+ public global::Vectara.ListAgentTracesResponse? Type628 { get; set; }
///
///
///
- public global::Vectara.ListSessionArtifactsSortBy? Type629 { get; set; }
+ public global::System.Collections.Generic.IList? Type629 { get; set; }
///
///
///
- public global::Vectara.ListSessionArtifactsOrderBy? Type630 { get; set; }
+ public global::Vectara.AgentTraceSpanStatus? Type630 { get; set; }
///
///
///
- public global::Vectara.ListPipelinesSourceType? Type631 { get; set; }
+ public global::Vectara.AgentTraceSpanBase? Type631 { get; set; }
///
///
///
- public global::Vectara.AllOf? Type632 { get; set; }
+ public global::Vectara.AgentTraceInputFile? Type632 { get; set; }
///
///
///
- public global::Vectara.CreateUserResponse2? Type633 { get; set; }
+ public global::Vectara.InvokeAgentSpanAttributes? Type633 { get; set; }
///
///
///
- public global::Vectara.ResetUserPasswordResponse? Type634 { get; set; }
+ public global::Vectara.InvokeAgentSpanAttributesOutputType? Type634 { get; set; }
///
///
///
- public global::Vectara.GetTokenResponse? Type635 { get; set; }
+ public global::System.Collections.Generic.IList? Type635 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.InvokeAgentSpanContent? Type636 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.InvokeAgentTraceSpan? Type637 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.InvokeAgentTraceSpanVariant2? Type638 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ChatSpanAttributes? Type639 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ChatTraceSpan? Type640 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ChatTraceSpanVariant2? Type641 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ExecuteToolSpanAttributes? Type642 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ExecuteToolSpanContent? Type643 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ExecuteToolTraceSpan? Type644 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ExecuteToolTraceSpanVariant2? Type645 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ThinkingSpanContent? Type646 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ThinkingTraceSpan? Type647 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ThinkingTraceSpanVariant2? Type648 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.OutputSpanContent? Type649 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.OutputTraceSpan? Type650 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.OutputTraceSpanVariant2? Type651 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GuardrailSpanAttributes? Type652 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GuardrailSpanContent? Type653 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GuardrailTraceSpan? Type654 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GuardrailTraceSpanVariant2? Type655 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.StepTransitionSpanAttributes? Type656 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.StepTransitionTraceSpan? Type657 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.StepTransitionTraceSpanVariant2? Type658 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ImageReadSpanAttributes? Type659 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ImageReadTraceSpan? Type660 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ImageReadTraceSpanVariant2? Type661 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.CompactionSpanAttributes? Type662 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.CompactionTraceSpan? Type663 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.CompactionTraceSpanVariant2? Type664 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.AgentTraceSpan? Type665 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.AgentTraceSpanDiscriminator? Type666 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type667 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListAgentTraceSpansResponse? Type668 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type669 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.Glossary? Type670 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListGlossariesResponse? Type671 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type672 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.CreateGlossaryRequest? Type673 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.UpdateGlossaryRequest? Type674 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GlossaryEntry? Type675 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GlossaryEntriesResponse? Type676 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type677 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.UpsertGlossaryEntriesRequest? Type678 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.DeleteGlossaryEntriesRequest? Type679 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GetOAuthTokenRequest? Type680 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.CreateCorpusDocumentWaitFor? Type681 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type682 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListToolServersType? Type683 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListToolsType? Type684 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListInstructionsType? Type685 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListSessionArtifactsSortBy? Type686 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListSessionArtifactsOrderBy? Type687 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListAgentConnectorsType? Type688 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListPipelinesSourceType? Type689 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListTracesStatus? Type690 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListTracesErrorType? Type691 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListTracesOperation? Type692 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListTracesToolErrorType? Type693 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ListTraceSpansOperation? Type694 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.AllOf? Type695 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.CreateUserResponse2? Type696 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.ResetUserPasswordResponse? Type697 { get; set; }
+ ///
+ ///
+ ///
+ public global::Vectara.GetTokenResponse? Type698 { get; set; }
///
///
@@ -2829,26 +3081,42 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::System.Collections.Generic.List? ListType64 { get; set; }
+ public global::System.Collections.Generic.List? ListType64 { 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? ListType65 { 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; }
///