diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs index af4c9a08..90cfd3ad 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs @@ -48,6 +48,8 @@ partial void PrepareListTraceSpansArguments( ref string traceId, ref bool? includeContent, ref global::Vectara.ListTraceSpansOperation? operation, + ref string? parentSpanId, + ref bool? excludeSubagents, ref int? limit, ref string? pageKey); partial void PrepareListTraceSpansRequest( @@ -58,6 +60,8 @@ partial void PrepareListTraceSpansRequest( string traceId, bool? includeContent, global::Vectara.ListTraceSpansOperation? operation, + string? parentSpanId, + bool? excludeSubagents, int? limit, string? pageKey); partial void ProcessListTraceSpansResponse( @@ -80,6 +84,10 @@ partial void ProcessListTraceSpansResponseContent( /// Default Value: false /// /// + /// + /// + /// Default Value: false + /// /// /// Default Value: 100 /// @@ -93,6 +101,8 @@ partial void ProcessListTraceSpansResponseContent( int? requestTimeoutMillis = default, bool? includeContent = default, global::Vectara.ListTraceSpansOperation? operation = default, + string? parentSpanId = default, + bool? excludeSubagents = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, @@ -104,6 +114,8 @@ partial void ProcessListTraceSpansResponseContent( requestTimeoutMillis: requestTimeoutMillis, includeContent: includeContent, operation: operation, + parentSpanId: parentSpanId, + excludeSubagents: excludeSubagents, limit: limit, pageKey: pageKey, requestOptions: requestOptions, @@ -123,6 +135,10 @@ partial void ProcessListTraceSpansResponseContent( /// Default Value: false /// /// + /// + /// + /// Default Value: false + /// /// /// Default Value: 100 /// @@ -136,6 +152,8 @@ partial void ProcessListTraceSpansResponseContent( int? requestTimeoutMillis = default, bool? includeContent = default, global::Vectara.ListTraceSpansOperation? operation = default, + string? parentSpanId = default, + bool? excludeSubagents = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, @@ -150,6 +168,8 @@ partial void ProcessListTraceSpansResponseContent( traceId: ref traceId, includeContent: ref includeContent, operation: ref operation, + parentSpanId: ref parentSpanId, + excludeSubagents: ref excludeSubagents, limit: ref limit, pageKey: ref pageKey); @@ -182,6 +202,8 @@ partial void ProcessListTraceSpansResponseContent( __pathBuilder .AddOptionalParameter("include_content", includeContent?.ToString().ToLowerInvariant()) .AddOptionalParameter("operation", operation?.ToValueString()) + .AddOptionalParameter("parent_span_id", parentSpanId) + .AddOptionalParameter("exclude_subagents", excludeSubagents?.ToString().ToLowerInvariant()) .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("page_key", pageKey) ; @@ -240,6 +262,8 @@ partial void ProcessListTraceSpansResponseContent( traceId: traceId!, includeContent: includeContent, operation: operation, + parentSpanId: parentSpanId, + excludeSubagents: excludeSubagents, limit: limit, pageKey: pageKey); diff --git a/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs new file mode 100644 index 00000000..78715d82 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.Get.g.cs @@ -0,0 +1,589 @@ + +#nullable enable + +namespace Vectara +{ + public partial class CustomerMetricsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_GetSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_GetSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_GetSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_GetSecurityRequirement0, + s_GetSecurityRequirement1, + }; + partial void PrepareGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string metricName, + global::System.Collections.Generic.Dictionary>? labels, + ref global::System.DateTime start, + ref global::System.DateTime end, + ref int? maxBuckets); + partial void PrepareGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string metricName, + global::System.Collections.Generic.Dictionary>? labels, + global::System.DateTime start, + global::System.DateTime end, + int? maxBuckets); + partial void ProcessGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Query a metric time series
+ /// Returns a time series of aggregated metric values for the named metric within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// Default Value: 60 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetAsync( + string metricName, + global::System.DateTime start, + global::System.DateTime end, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::System.Collections.Generic.Dictionary>? labels = default, + int? maxBuckets = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAsResponseAsync( + metricName: metricName, + start: start, + end: end, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + labels: labels, + maxBuckets: maxBuckets, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Query a metric time series
+ /// Returns a time series of aggregated metric values for the named metric within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// Default Value: 60 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAsResponseAsync( + string metricName, + global::System.DateTime start, + global::System.DateTime end, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::System.Collections.Generic.Dictionary>? labels = default, + int? maxBuckets = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + metricName: ref metricName, + labels: labels, + start: ref start, + end: ref end, + maxBuckets: ref maxBuckets); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSecurityRequirements, + operationName: "GetAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/metrics/{metricName}", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("labels", labels?.ToString()) + .AddRequiredParameter("start", start.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddRequiredParameter("end", end.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("max_buckets", maxBuckets?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + metricName: metricName!, + labels: labels, + start: start!, + end: end!, + maxBuckets: maxBuckets); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/metrics/{metricName}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/metrics/{metricName}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/metrics/{metricName}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/metrics/{metricName}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v2/metrics/{metricName}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + 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, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + 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, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.MetricSeries.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw 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); + + var __value = await global::Vectara.MetricSeries.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw 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.CustomerMetricsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs new file mode 100644 index 00000000..291df4ea --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.List.g.cs @@ -0,0 +1,468 @@ + +#nullable enable + +namespace Vectara +{ + public partial class CustomerMetricsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_ListSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_ListSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_ListSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_ListSecurityRequirement0, + s_ListSecurityRequirement1, + }; + partial void PrepareListArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis); + partial void PrepareListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis); + partial void ProcessListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List available metrics
+ /// Returns the catalog of registered metrics that can be queried via `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and supported labels. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListAsync( + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAsResponseAsync( + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List available metrics
+ /// Returns the catalog of registered metrics that can be queried via `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and supported labels. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListAsResponseAsync( + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListSecurityRequirements, + operationName: "ListAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: "/v2/metrics", + 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); + PrepareListRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v2/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Vectara.ListMetricsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw 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); + + var __value = await global::Vectara.ListMetricsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw 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.CustomerMetricsClient.g.cs b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.g.cs new file mode 100644 index 00000000..40ce0443 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.CustomerMetricsClient.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class CustomerMetricsClient : global::Vectara.ICustomerMetricsClient, 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 CustomerMetricsClient. + /// 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 CustomerMetricsClient( + 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 CustomerMetricsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public CustomerMetricsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the CustomerMetricsClient. + /// 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 CustomerMetricsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Vectara.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Vectara.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraceSpans.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraceSpans.g.cs index 6e51ebdd..171fa1dc 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraceSpans.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentAnalyticsClient.ListTraceSpans.g.cs @@ -15,6 +15,10 @@ public partial interface IAgentAnalyticsClient /// Default Value: false /// /// + /// + /// + /// Default Value: false + /// /// /// Default Value: 100 /// @@ -28,6 +32,8 @@ public partial interface IAgentAnalyticsClient int? requestTimeoutMillis = default, bool? includeContent = default, global::Vectara.ListTraceSpansOperation? operation = default, + string? parentSpanId = default, + bool? excludeSubagents = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, @@ -43,6 +49,10 @@ public partial interface IAgentAnalyticsClient /// Default Value: false /// /// + /// + /// + /// Default Value: false + /// /// /// Default Value: 100 /// @@ -56,6 +66,8 @@ public partial interface IAgentAnalyticsClient int? requestTimeoutMillis = default, bool? includeContent = default, global::Vectara.ListTraceSpansOperation? operation = default, + string? parentSpanId = default, + bool? excludeSubagents = default, int? limit = default, string? pageKey = default, global::Vectara.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs new file mode 100644 index 00000000..17d728bd --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.Get.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara +{ + public partial interface ICustomerMetricsClient + { + /// + /// Query a metric time series
+ /// Returns a time series of aggregated metric values for the named metric within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// Default Value: 60 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetAsync( + string metricName, + global::System.DateTime start, + global::System.DateTime end, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::System.Collections.Generic.Dictionary>? labels = default, + int? maxBuckets = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Query a metric time series
+ /// Returns a time series of aggregated metric values for the named metric within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// + /// + /// Default Value: 60 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAsResponseAsync( + string metricName, + global::System.DateTime start, + global::System.DateTime end, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::System.Collections.Generic.Dictionary>? labels = default, + int? maxBuckets = 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.ICustomerMetricsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.List.g.cs new file mode 100644 index 00000000..5f4889c1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.List.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Vectara +{ + public partial interface ICustomerMetricsClient + { + /// + /// List available metrics
+ /// Returns the catalog of registered metrics that can be queried via `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and supported labels. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListAsync( + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List available metrics
+ /// Returns the catalog of registered metrics that can be queried via `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and supported labels. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListAsResponseAsync( + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.g.cs b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.g.cs new file mode 100644 index 00000000..6a1c3ba4 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.ICustomerMetricsClient.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 ICustomerMetricsClient : 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.IVectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs index 0d6ec6bb..92158ef7 100644 --- a/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IVectaraClient.g.cs @@ -109,6 +109,11 @@ public partial interface IVectaraClient : global::System.IDisposable /// public CorporaClient Corpora { get; } + /// + /// + /// + public CustomerMetricsClient CustomerMetrics { get; } + /// /// /// diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs index a75cb13b..99f5659b 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ChatTraceSpan.g.cs @@ -37,6 +37,7 @@ public class ChatTraceSpanJsonConverter : global::System.Text.Json.Serialization var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs index bdbdac90..34481f1a 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CompactionTraceSpan.g.cs @@ -37,6 +37,7 @@ public class CompactionTraceSpanJsonConverter : global::System.Text.Json.Seriali var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs new file mode 100644 index 00000000..43565b0a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CounterMetricSeries.g.cs @@ -0,0 +1,144 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class CounterMetricSeriesJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.CounterMetricSeries 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("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("metric_name")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + if (__jsonProps.Contains("points")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricSeriesBase? @base = default; + global::Vectara.CounterMetricSeriesVariant2? counterMetricSeriesVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).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.CounterMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricSeriesVariant2).Name}"); + counterMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && counterMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && counterMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricSeriesVariant2).Name}"); + counterMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.CounterMetricSeries( + @base, + + counterMetricSeriesVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.CounterMetricSeries 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.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsCounterMetricSeriesVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricSeriesVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CounterMetricSeriesVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs new file mode 100644 index 00000000..6166ecda --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.DistributionMetricSeries.g.cs @@ -0,0 +1,144 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class DistributionMetricSeriesJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.DistributionMetricSeries 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("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("metric_name")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + if (__jsonProps.Contains("points")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricSeriesBase? @base = default; + global::Vectara.DistributionMetricSeriesVariant2? distributionMetricSeriesVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).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.DistributionMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricSeriesVariant2).Name}"); + distributionMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && distributionMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && distributionMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricSeriesVariant2).Name}"); + distributionMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.DistributionMetricSeries( + @base, + + distributionMetricSeriesVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.DistributionMetricSeries 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.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsDistributionMetricSeriesVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricSeriesVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.DistributionMetricSeriesVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs index df2f2408..8f321762 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ExecuteToolTraceSpan.g.cs @@ -37,6 +37,7 @@ public class ExecuteToolTraceSpanJsonConverter : global::System.Text.Json.Serial var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs new file mode 100644 index 00000000..3f9e49bc --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GaugeMetricSeries.g.cs @@ -0,0 +1,144 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class GaugeMetricSeriesJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.GaugeMetricSeries 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("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("metric_name")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + if (__jsonProps.Contains("points")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricSeriesBase? @base = default; + global::Vectara.GaugeMetricSeriesVariant2? gaugeMetricSeriesVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).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.GaugeMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricSeriesVariant2).Name}"); + gaugeMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && gaugeMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && gaugeMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricSeriesVariant2).Name}"); + gaugeMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.GaugeMetricSeries( + @base, + + gaugeMetricSeriesVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.GaugeMetricSeries 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.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsGaugeMetricSeriesVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricSeriesVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GaugeMetricSeriesVariant2!, 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 index 75e9afda..4ec1abe6 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.GuardrailTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.GuardrailTraceSpan.g.cs @@ -37,6 +37,7 @@ public class GuardrailTraceSpanJsonConverter : global::System.Text.Json.Serializ var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs index e04e3d07..d3b1be9b 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ImageReadTraceSpan.g.cs @@ -37,6 +37,7 @@ public class ImageReadTraceSpanJsonConverter : global::System.Text.Json.Serializ var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs index b7a6b752..b5a98b32 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs @@ -40,6 +40,7 @@ public class InlineWebGetToolConfigurationJsonConverter : global::System.Text.Js if (__jsonProps.Contains("output_transform")) __score0++; var __score1 = 0; if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.auth")) __score1++; if (__jsonProps.Contains("argument_override.body")) __score1++; if (__jsonProps.Contains("argument_override.follow_redirects")) __score1++; if (__jsonProps.Contains("argument_override.head_lines")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs index 37c6fd9b..9d56673c 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InvokeAgentTraceSpan.g.cs @@ -37,6 +37,7 @@ public class InvokeAgentTraceSpanJsonConverter : global::System.Text.Json.Serial var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; @@ -48,6 +49,7 @@ public class InvokeAgentTraceSpanJsonConverter : global::System.Text.Json.Serial 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.depth")) __score1++; if (__jsonProps.Contains("attributes.input_event_id")) __score1++; if (__jsonProps.Contains("attributes.input_files")) __score1++; if (__jsonProps.Contains("attributes.input_tokens")) __score1++; @@ -56,6 +58,8 @@ public class InvokeAgentTraceSpanJsonConverter : global::System.Text.Json.Serial 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.parent_agent_id")) __score1++; + if (__jsonProps.Contains("attributes.parent_session_id")) __score1++; if (__jsonProps.Contains("attributes.provider_name")) __score1++; if (__jsonProps.Contains("attributes.temperature")) __score1++; if (__jsonProps.Contains("content")) __score1++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKind.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKind.g.cs new file mode 100644 index 00000000..25f0e711 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class MetricKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.MetricKind 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.MetricKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.MetricKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.MetricKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.MetricKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.MetricKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKindNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKindNullable.g.cs new file mode 100644 index 00000000..610c5ee8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class MetricKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.MetricKind? 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.MetricKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.MetricKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.MetricKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.MetricKind? 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.MetricKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeries.g.cs new file mode 100644 index 00000000..61d95347 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeries.g.cs @@ -0,0 +1,102 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class MetricSeriesJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.MetricSeries 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.MetricSeriesDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.MetricSeriesDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.CounterMetricSeries? counter = default; + if (discriminator?.Kind == global::Vectara.MetricSeriesDiscriminatorKind.Counter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.CounterMetricSeries)}"); + counter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.GaugeMetricSeries? gauge = default; + if (discriminator?.Kind == global::Vectara.MetricSeriesDiscriminatorKind.Gauge) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.GaugeMetricSeries)}"); + gauge = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.PercentilesMetricSeries? percentiles = default; + if (discriminator?.Kind == global::Vectara.MetricSeriesDiscriminatorKind.Percentiles) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.PercentilesMetricSeries)}"); + percentiles = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.DistributionMetricSeries? distribution = default; + if (discriminator?.Kind == global::Vectara.MetricSeriesDiscriminatorKind.Distribution) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.DistributionMetricSeries)}"); + distribution = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.MetricSeries( + discriminator?.Kind, + counter, + + gauge, + + percentiles, + + distribution + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.MetricSeries value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsCounter) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.CounterMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.CounterMetricSeries).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Counter!.Value, typeInfo); + } + else if (value.IsGauge) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.GaugeMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.GaugeMetricSeries).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Gauge!.Value, typeInfo); + } + else if (value.IsPercentiles) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricSeries).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Percentiles!.Value, typeInfo); + } + else if (value.IsDistribution) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.DistributionMetricSeries), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.DistributionMetricSeries).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Distribution!.Value, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeriesDiscriminatorKind.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeriesDiscriminatorKind.g.cs new file mode 100644 index 00000000..15b9dc75 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeriesDiscriminatorKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class MetricSeriesDiscriminatorKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.MetricSeriesDiscriminatorKind 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.MetricSeriesDiscriminatorKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.MetricSeriesDiscriminatorKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.MetricSeriesDiscriminatorKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.MetricSeriesDiscriminatorKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.MetricSeriesDiscriminatorKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullable.g.cs new file mode 100644 index 00000000..c6dbffa6 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class MetricSeriesDiscriminatorKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.MetricSeriesDiscriminatorKind? 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.MetricSeriesDiscriminatorKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.MetricSeriesDiscriminatorKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.MetricSeriesDiscriminatorKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.MetricSeriesDiscriminatorKind? 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.MetricSeriesDiscriminatorKindExtensions.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 index e2412f11..93053e88 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.OutputTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.OutputTraceSpan.g.cs @@ -30,6 +30,7 @@ public class OutputTraceSpanJsonConverter : global::System.Text.Json.Serializati var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs new file mode 100644 index 00000000..f5076b18 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.PercentilesMetricSeries.g.cs @@ -0,0 +1,144 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class PercentilesMetricSeriesJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.PercentilesMetricSeries 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("bucket_size_seconds")) __score0++; + if (__jsonProps.Contains("labels")) __score0++; + if (__jsonProps.Contains("metric_name")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("kind")) __score1++; + if (__jsonProps.Contains("points")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.MetricSeriesBase? @base = default; + global::Vectara.PercentilesMetricSeriesVariant2? percentilesMetricSeriesVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).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.PercentilesMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricSeriesVariant2).Name}"); + percentilesMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && percentilesMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (@base == null && percentilesMetricSeriesVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricSeriesVariant2).Name}"); + percentilesMetricSeriesVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.PercentilesMetricSeries( + @base, + + percentilesMetricSeriesVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.PercentilesMetricSeries 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.MetricSeriesBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.MetricSeriesBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsPercentilesMetricSeriesVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.PercentilesMetricSeriesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.PercentilesMetricSeriesVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PercentilesMetricSeriesVariant2!, 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 index f7f881d7..f00319d1 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.StepTransitionTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.StepTransitionTraceSpan.g.cs @@ -37,6 +37,7 @@ public class StepTransitionTraceSpanJsonConverter : global::System.Text.Json.Ser var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs index 93ea7375..c486f3dd 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ThinkingTraceSpan.g.cs @@ -30,6 +30,7 @@ public class ThinkingTraceSpanJsonConverter : global::System.Text.Json.Serializa var __score0 = 0; if (__jsonProps.Contains("duration_ms")) __score0++; if (__jsonProps.Contains("error_message")) __score0++; + if (__jsonProps.Contains("has_children")) __score0++; if (__jsonProps.Contains("parent_span_id")) __score0++; if (__jsonProps.Contains("span_id")) __score0++; if (__jsonProps.Contains("started_at")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuth.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuth.g.cs new file mode 100644 index 00000000..0e61f04a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuth.g.cs @@ -0,0 +1,117 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class WebGetAuthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.WebGetAuth 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.WebGetAuthDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WebGetAuthDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Vectara.WebGetNoAuth? none = default; + if (discriminator?.Type == global::Vectara.WebGetAuthDiscriminatorType.None) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetNoAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WebGetNoAuth)}"); + none = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.WebGetBearerAuth? bearer = default; + if (discriminator?.Type == global::Vectara.WebGetAuthDiscriminatorType.Bearer) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetBearerAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WebGetBearerAuth)}"); + bearer = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.WebGetHeaderAuth? header = default; + if (discriminator?.Type == global::Vectara.WebGetAuthDiscriminatorType.Header) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetHeaderAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WebGetHeaderAuth)}"); + header = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.WebGetOAuthClientCredentialsAuth? oauthClientCredentials = default; + if (discriminator?.Type == global::Vectara.WebGetAuthDiscriminatorType.OauthClientCredentials) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetOAuthClientCredentialsAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WebGetOAuthClientCredentialsAuth)}"); + oauthClientCredentials = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Vectara.WebGetOAuthRefreshTokenAuth? oauthRefreshToken = default; + if (discriminator?.Type == global::Vectara.WebGetAuthDiscriminatorType.OauthRefreshToken) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetOAuthRefreshTokenAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.WebGetOAuthRefreshTokenAuth)}"); + oauthRefreshToken = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Vectara.WebGetAuth( + discriminator?.Type, + none, + + bearer, + + header, + + oauthClientCredentials, + + oauthRefreshToken + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.WebGetAuth 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.IsNone) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetNoAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WebGetNoAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.None!, typeInfo); + } + else if (value.IsBearer) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetBearerAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WebGetBearerAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Bearer!, typeInfo); + } + else if (value.IsHeader) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetHeaderAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WebGetHeaderAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Header!, typeInfo); + } + else if (value.IsOauthClientCredentials) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetOAuthClientCredentialsAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WebGetOAuthClientCredentialsAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OauthClientCredentials!, typeInfo); + } + else if (value.IsOauthRefreshToken) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.WebGetOAuthRefreshTokenAuth), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.WebGetOAuthRefreshTokenAuth).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OauthRefreshToken!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuthDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuthDiscriminatorType.g.cs new file mode 100644 index 00000000..57fb0013 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuthDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class WebGetAuthDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.WebGetAuthDiscriminatorType 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.WebGetAuthDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.WebGetAuthDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.WebGetAuthDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.WebGetAuthDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.WebGetAuthDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuthDiscriminatorTypeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuthDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..3926e4e0 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetAuthDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class WebGetAuthDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.WebGetAuthDiscriminatorType? 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.WebGetAuthDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.WebGetAuthDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.WebGetAuthDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.WebGetAuthDiscriminatorType? 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.WebGetAuthDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetHeaderValue.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetHeaderValue.g.cs new file mode 100644 index 00000000..af0cdd38 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.WebGetHeaderValue.g.cs @@ -0,0 +1,140 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class WebGetHeaderValueJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.WebGetHeaderValue 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; + var __score1 = 0; + if (__jsonProps.Contains("$ref")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + string? webGetHeaderValueVariant1 = default; + global::Vectara.EagerReference? eagerReference = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + webGetHeaderValueVariant1 = 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.EagerReference), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.EagerReference).Name}"); + eagerReference = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (webGetHeaderValueVariant1 == null && eagerReference == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + webGetHeaderValueVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (webGetHeaderValueVariant1 == null && eagerReference == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.EagerReference), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.EagerReference).Name}"); + eagerReference = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.WebGetHeaderValue( + webGetHeaderValueVariant1, + + eagerReference + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.WebGetHeaderValue 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.IsWebGetHeaderValueVariant1) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebGetHeaderValueVariant1!, typeInfo); + } + else if (value.IsEagerReference) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.EagerReference), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.EagerReference).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.EagerReference!, 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 00a5e4a0..b7c40003 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs @@ -225,6 +225,10 @@ namespace Vectara typeof(global::Vectara.JsonConverters.WebSearchToolParametersProviderNullableJsonConverter), + typeof(global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.WebGetToolParametersMethodJsonConverter), typeof(global::Vectara.JsonConverters.WebGetToolParametersMethodNullableJsonConverter), @@ -397,6 +401,14 @@ namespace Vectara typeof(global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.MetricKindJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricKindNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullableJsonConverter), + typeof(global::Vectara.JsonConverters.AgentTraceStatusJsonConverter), typeof(global::Vectara.JsonConverters.AgentTraceStatusNullableJsonConverter), @@ -559,6 +571,10 @@ namespace Vectara typeof(global::Vectara.JsonConverters.InlineWebSearchToolConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.WebGetHeaderValueJsonConverter), + + typeof(global::Vectara.JsonConverters.WebGetAuthJsonConverter), + typeof(global::Vectara.JsonConverters.InlineWebGetToolConfigurationJsonConverter), typeof(global::Vectara.JsonConverters.InlineLambdaToolConfigurationJsonConverter), @@ -669,6 +685,16 @@ namespace Vectara typeof(global::Vectara.JsonConverters.PipelineRunEventJsonConverter), + typeof(global::Vectara.JsonConverters.CounterMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.GaugeMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.PercentilesMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.DistributionMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricSeriesJsonConverter), + typeof(global::Vectara.JsonConverters.InvokeAgentTraceSpanJsonConverter), typeof(global::Vectara.JsonConverters.ChatTraceSpanJsonConverter), @@ -697,7 +723,21 @@ namespace Vectara typeof(global::Vectara.JsonConverters.OneOfJsonConverter), - typeof(global::Vectara.JsonConverters.OneOfJsonConverter, global::Vectara.EagerReference>), + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), typeof(global::Vectara.JsonConverters.OneOfJsonConverter), @@ -1125,9 +1165,19 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebSearchToolParametersProvider), TypeInfoPropertyName = "WebSearchToolParametersProvider2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebSearchToolConfiguration), TypeInfoPropertyName = "InlineWebSearchToolConfiguration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetHeaderValue), TypeInfoPropertyName = "WebGetHeaderValue2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetHeadersMap))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetNoAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetBearerAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetHeaderAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetOAuthClientCredentialsAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetOAuthRefreshTokenAuth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetAuth), TypeInfoPropertyName = "WebGetAuth2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetAuthDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetAuthDiscriminatorType), TypeInfoPropertyName = "WebGetAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetToolParametersMethod), TypeInfoPropertyName = "WebGetToolParametersMethod2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf, global::Vectara.EagerReference>), TypeInfoPropertyName = "OneOfDictionaryStringStringEagerReference2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfWebGetHeadersMapEagerReference2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfBooleanEagerReference2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfInt32EagerReference2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfInt64EagerReference2")] @@ -1207,16 +1257,6 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateFirstAgentStep))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentStep))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InputTokens))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OutputTokens))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SessionContextUsage))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentSession))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentSessionsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentSessionRequest))] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1440,6 +1480,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.WebSearchToolParametersProviderNullableJsonConverter), + typeof(global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeJsonConverter), + + typeof(global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.WebGetToolParametersMethodJsonConverter), typeof(global::Vectara.JsonConverters.WebGetToolParametersMethodNullableJsonConverter), @@ -1612,6 +1656,14 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.MetricKindJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricKindNullableJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullableJsonConverter), + typeof(global::Vectara.JsonConverters.AgentTraceStatusJsonConverter), typeof(global::Vectara.JsonConverters.AgentTraceStatusNullableJsonConverter), @@ -1774,6 +1826,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.InlineWebSearchToolConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.WebGetHeaderValueJsonConverter), + + typeof(global::Vectara.JsonConverters.WebGetAuthJsonConverter), + typeof(global::Vectara.JsonConverters.InlineWebGetToolConfigurationJsonConverter), typeof(global::Vectara.JsonConverters.InlineLambdaToolConfigurationJsonConverter), @@ -1884,6 +1940,16 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.PipelineRunEventJsonConverter), + typeof(global::Vectara.JsonConverters.CounterMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.GaugeMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.PercentilesMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.DistributionMetricSeriesJsonConverter), + + typeof(global::Vectara.JsonConverters.MetricSeriesJsonConverter), + typeof(global::Vectara.JsonConverters.InvokeAgentTraceSpanJsonConverter), typeof(global::Vectara.JsonConverters.ChatTraceSpanJsonConverter), @@ -1912,7 +1978,21 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.OneOfJsonConverter), - typeof(global::Vectara.JsonConverters.OneOfJsonConverter, global::Vectara.EagerReference>), + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), + + typeof(global::Vectara.JsonConverters.OneOfJsonConverter), typeof(global::Vectara.JsonConverters.OneOfJsonConverter), @@ -1932,6 +2012,16 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::Vectara.JsonConverters.UnixTimestampJsonConverter), })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentStep))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InputTokens))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OutputTokens))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SessionContextUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentSession))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentSessionsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentSessionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateAgentSessionRequestFromSession))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateAgentSessionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentEventBase))] @@ -2111,6 +2201,30 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PipelineRunEventDiscriminatorType), TypeInfoPropertyName = "PipelineRunEventDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListPipelineRunEventsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricKind), TypeInfoPropertyName = "MetricKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricDescriptor))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListMetricsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricSeriesBase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ScalarMetricPoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CounterMetricSeries), TypeInfoPropertyName = "CounterMetricSeries2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CounterMetricSeriesVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GaugeMetricSeries), TypeInfoPropertyName = "GaugeMetricSeries2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GaugeMetricSeriesVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PercentilesMetricPoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PercentilesMetricSeries), TypeInfoPropertyName = "PercentilesMetricSeries2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.PercentilesMetricSeriesVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.HistogramBin))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DistributionMetricPoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DistributionMetricSeries), TypeInfoPropertyName = "DistributionMetricSeries2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DistributionMetricSeriesVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricSeries), TypeInfoPropertyName = "MetricSeries2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricSeriesDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.MetricSeriesDiscriminatorKind), TypeInfoPropertyName = "MetricSeriesDiscriminatorKind2")] [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))] @@ -2254,6 +2368,11 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -2409,6 +2528,8 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.UpdateInstructionRequestDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebSearchToolParametersProviderJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebSearchToolParametersProviderNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebGetToolParametersMethodJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WebGetToolParametersMethodNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.SubAgentSessionModeJsonConverter()); @@ -2495,6 +2616,10 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.RecordProcessingEventStatusNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineRunEventDiscriminatorTypeNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricKindJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricKindNullableJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentTraceStatusJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentTraceStatusNullableJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.AgentTraceSpanStatusJsonConverter()); @@ -2576,6 +2701,8 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.InlineMcpToolConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.InlineCorporaSearchToolConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.InlineWebSearchToolConfigurationJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.WebGetHeaderValueJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.WebGetAuthJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.InlineWebGetToolConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.InlineLambdaToolConfigurationJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.InlineSubAgentToolConfigurationJsonConverter()); @@ -2631,6 +2758,11 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.RecordProcessingEventJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.WatermarkAdvancedEventJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.PipelineRunEventJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.CounterMetricSeriesJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.GaugeMetricSeriesJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.PercentilesMetricSeriesJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.DistributionMetricSeriesJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.MetricSeriesJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.InvokeAgentTraceSpanJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ChatTraceSpanJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.ExecuteToolTraceSpanJsonConverter()); @@ -2645,7 +2777,14 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); - options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter, global::Vectara.EagerReference>()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); + options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::Vectara.JsonConverters.OneOfJsonConverter()); diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs index 24d58278..e14a6481 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs @@ -1652,1379 +1652,1515 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Vectara.WebGetToolParameters? Type406 { get; set; } + public global::Vectara.WebGetHeaderValue? Type406 { get; set; } /// /// /// - public global::Vectara.WebGetToolParametersMethod? Type407 { get; set; } + public global::Vectara.WebGetHeadersMap? Type407 { get; set; } /// /// /// - public global::Vectara.OneOf, global::Vectara.EagerReference>? Type408 { get; set; } + public global::Vectara.WebGetNoAuth? Type408 { get; set; } /// /// /// - public global::Vectara.OneOf? Type409 { get; set; } + public global::Vectara.WebGetBearerAuth? Type409 { get; set; } /// /// /// - public global::Vectara.OneOf? Type410 { get; set; } + public global::Vectara.WebGetHeaderAuth? Type410 { get; set; } /// /// /// - public global::Vectara.OneOf? Type411 { get; set; } + public global::Vectara.WebGetOAuthClientCredentialsAuth? Type411 { get; set; } /// /// /// - public global::Vectara.InlineWebGetToolConfiguration? Type412 { get; set; } + public global::Vectara.WebGetOAuthRefreshTokenAuth? Type412 { get; set; } /// /// /// - public global::Vectara.InlineWebGetToolConfigurationVariant2? Type413 { get; set; } + public global::Vectara.WebGetAuth? Type413 { get; set; } /// /// /// - public global::Vectara.InlineLambdaToolConfiguration? Type414 { get; set; } + public global::Vectara.WebGetAuthDiscriminator? Type414 { get; set; } /// /// /// - public global::Vectara.InlineLambdaToolConfigurationVariant2? Type415 { get; set; } + public global::Vectara.WebGetAuthDiscriminatorType? Type415 { get; set; } /// /// /// - public global::Vectara.SubAgentToolParameters? Type416 { get; set; } + public global::Vectara.WebGetToolParameters? Type416 { get; set; } /// /// /// - public global::Vectara.SubAgentSessionMode? Type417 { get; set; } + public global::Vectara.WebGetToolParametersMethod? Type417 { get; set; } /// /// /// - public global::Vectara.SubAgentConfiguration? Type418 { get; set; } + public global::Vectara.OneOf? Type418 { get; set; } /// /// /// - public global::Vectara.InlineSubAgentToolConfiguration? Type419 { get; set; } + public global::Vectara.OneOf? Type419 { get; set; } /// /// /// - public global::Vectara.InlineSubAgentToolConfigurationVariant2? Type420 { get; set; } + public global::Vectara.OneOf? Type420 { get; set; } /// /// /// - public global::Vectara.InlineArtifactCreateToolConfiguration? Type421 { get; set; } + public global::Vectara.OneOf? Type421 { get; set; } /// /// /// - public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? Type422 { get; set; } + public global::Vectara.InlineWebGetToolConfiguration? Type422 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolParameters? Type423 { get; set; } + public global::Vectara.InlineWebGetToolConfigurationVariant2? Type423 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolParametersEncoding? Type424 { get; set; } + public global::Vectara.InlineLambdaToolConfiguration? Type424 { get; set; } /// /// /// - public global::Vectara.ArtifactReadConfiguration? Type425 { get; set; } + public global::Vectara.InlineLambdaToolConfigurationVariant2? Type425 { get; set; } /// /// /// - public global::Vectara.InlineArtifactReadToolConfiguration? Type426 { get; set; } + public global::Vectara.SubAgentToolParameters? Type426 { get; set; } /// /// /// - public global::Vectara.InlineArtifactReadToolConfigurationVariant2? Type427 { get; set; } + public global::Vectara.SubAgentSessionMode? Type427 { get; set; } /// /// /// - public global::Vectara.ArtifactGrepToolParameters? Type428 { get; set; } + public global::Vectara.SubAgentConfiguration? Type428 { get; set; } /// /// /// - public global::Vectara.InlineArtifactGrepToolConfiguration? Type429 { get; set; } + public global::Vectara.InlineSubAgentToolConfiguration? Type429 { get; set; } /// /// /// - public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? Type430 { get; set; } + public global::Vectara.InlineSubAgentToolConfigurationVariant2? Type430 { get; set; } /// /// /// - public global::Vectara.ImageReadToolParameters? Type431 { get; set; } + public global::Vectara.InlineArtifactCreateToolConfiguration? Type431 { get; set; } /// /// /// - public global::Vectara.ImageReadToolParametersDetail? Type432 { get; set; } + public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? Type432 { get; set; } /// /// /// - public global::Vectara.InlineImageReadToolConfiguration? Type433 { get; set; } + public global::Vectara.ArtifactReadToolParameters? Type433 { get; set; } /// /// /// - public global::Vectara.InlineImageReadToolConfigurationVariant2? Type434 { get; set; } + public global::Vectara.ArtifactReadToolParametersEncoding? Type434 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolParameters? Type435 { get; set; } + public global::Vectara.ArtifactReadConfiguration? Type435 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolParametersOutputFormat? Type436 { get; set; } + public global::Vectara.InlineArtifactReadToolConfiguration? Type436 { get; set; } /// /// /// - public global::Vectara.InlineDocumentConversionToolConfiguration? Type437 { get; set; } + public global::Vectara.InlineArtifactReadToolConfigurationVariant2? Type437 { get; set; } /// /// /// - public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? Type438 { get; set; } + public global::Vectara.ArtifactGrepToolParameters? Type438 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextParameters? Type439 { get; set; } + public global::Vectara.InlineArtifactGrepToolConfiguration? Type439 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextConfiguration? Type440 { get; set; } + public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? Type440 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextConfigurationMetadata? Type441 { get; set; } + public global::Vectara.ImageReadToolParameters? Type441 { get; set; } /// /// /// - public global::Vectara.InlineGetDocumentTextToolConfiguration? Type442 { get; set; } + public global::Vectara.ImageReadToolParametersDetail? Type442 { get; set; } /// /// /// - public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? Type443 { get; set; } + public global::Vectara.InlineImageReadToolConfiguration? Type443 { get; set; } /// /// /// - public global::Vectara.AgentToolConfiguration? Type444 { get; set; } + public global::Vectara.InlineImageReadToolConfigurationVariant2? Type444 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationDiscriminator? Type445 { get; set; } + public global::Vectara.DocumentConversionToolParameters? Type445 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationDiscriminatorType? Type446 { get; set; } + public global::Vectara.DocumentConversionToolParametersOutputFormat? Type446 { get; set; } /// /// /// - public global::Vectara.AgentSkill? Type447 { get; set; } + public global::Vectara.InlineDocumentConversionToolConfiguration? Type447 { get; set; } /// /// /// - public global::Vectara.RetryConfiguration? Type448 { get; set; } + public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? Type448 { get; set; } /// /// /// - public global::Vectara.AgentModel? Type449 { get; set; } + public global::Vectara.GetDocumentTextParameters? Type449 { get; set; } /// /// /// - public global::Vectara.InstructionReference? Type450 { get; set; } + public global::Vectara.GetDocumentTextConfiguration? Type450 { get; set; } /// /// /// - public global::Vectara.ReferenceInstruction? Type451 { get; set; } + public global::Vectara.GetDocumentTextConfigurationMetadata? Type451 { get; set; } /// /// /// - public global::Vectara.ReferenceInstructionVariant2? Type452 { get; set; } + public global::Vectara.InlineGetDocumentTextToolConfiguration? Type452 { get; set; } /// /// /// - public global::Vectara.InlineInstruction? Type453 { get; set; } + public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? Type453 { get; set; } /// /// /// - public global::Vectara.InlineInstructionVariant2? Type454 { get; set; } + public global::Vectara.AgentToolConfiguration? Type454 { get; set; } /// /// /// - public global::Vectara.AgentStepInstruction? Type455 { get; set; } + public global::Vectara.AgentToolConfigurationDiscriminator? Type455 { get; set; } /// /// /// - public global::Vectara.AgentStepInstructionDiscriminator? Type456 { get; set; } + public global::Vectara.AgentToolConfigurationDiscriminatorType? Type456 { get; set; } /// /// /// - public global::Vectara.AgentStepInstructionDiscriminatorType? Type457 { get; set; } + public global::Vectara.AgentSkill? Type457 { get; set; } /// /// /// - public global::Vectara.DefaultOutputParser? Type458 { get; set; } + public global::Vectara.RetryConfiguration? Type458 { get; set; } /// /// /// - public global::Vectara.StructuredOutputParser? Type459 { get; set; } + public global::Vectara.AgentModel? Type459 { get; set; } /// /// /// - public global::Vectara.AgentOutputParser? Type460 { get; set; } + public global::Vectara.InstructionReference? Type460 { get; set; } /// /// /// - public global::Vectara.AgentOutputParserDiscriminator? Type461 { get; set; } + public global::Vectara.ReferenceInstruction? Type461 { get; set; } /// /// /// - public global::Vectara.AgentOutputParserDiscriminatorType? Type462 { get; set; } + public global::Vectara.ReferenceInstructionVariant2? Type462 { get; set; } /// /// /// - public global::Vectara.TemplatedReminder? Type463 { get; set; } + public global::Vectara.InlineInstruction? Type463 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type464 { get; set; } + public global::Vectara.InlineInstructionVariant2? Type464 { get; set; } /// /// /// - public global::Vectara.TemplatedReminderHook? Type465 { get; set; } + public global::Vectara.AgentStepInstruction? Type465 { get; set; } /// /// /// - public global::Vectara.GlossaryExpansionReminder? Type466 { get; set; } + public global::Vectara.AgentStepInstructionDiscriminator? Type466 { get; set; } /// /// /// - public global::Vectara.AgentStepReminder? Type467 { get; set; } + public global::Vectara.AgentStepInstructionDiscriminatorType? Type467 { get; set; } /// /// /// - public global::Vectara.AgentStepReminderDiscriminator? Type468 { get; set; } + public global::Vectara.DefaultOutputParser? Type468 { get; set; } /// /// /// - public global::Vectara.AgentStepReminderDiscriminatorType? Type469 { get; set; } + public global::Vectara.StructuredOutputParser? Type469 { get; set; } /// /// /// - public global::Vectara.NextStep? Type470 { get; set; } + public global::Vectara.AgentOutputParser? Type470 { get; set; } /// /// /// - public global::Vectara.FirstAgentStep? Type471 { get; set; } + public global::Vectara.AgentOutputParserDiscriminator? Type471 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type472 { get; set; } + public global::Vectara.AgentOutputParserDiscriminatorType? Type472 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type473 { get; set; } + public global::Vectara.TemplatedReminder? Type473 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type474 { get; set; } + public global::System.Collections.Generic.IList? Type474 { get; set; } /// /// /// - public global::Vectara.AgentStep? Type475 { get; set; } + public global::Vectara.TemplatedReminderHook? Type475 { get; set; } /// /// /// - public global::Vectara.CompactionConfig? Type476 { get; set; } + public global::Vectara.GlossaryExpansionReminder? Type476 { get; set; } /// /// /// - public global::Vectara.CompactionConfigToolEventPolicy? Type477 { get; set; } + public global::Vectara.AgentStepReminder? Type477 { get; set; } /// /// /// - public global::Vectara.ToolOutputOffloadingConfiguration? Type478 { get; set; } + public global::Vectara.AgentStepReminderDiscriminator? Type478 { get; set; } /// /// /// - public global::Vectara.ToolOutputOffloadingConfigurationMode? Type479 { get; set; } + public global::Vectara.AgentStepReminderDiscriminatorType? Type479 { get; set; } /// /// /// - public global::Vectara.Agent? Type480 { get; set; } + public global::Vectara.NextStep? Type480 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type481 { get; set; } + public global::Vectara.FirstAgentStep? Type481 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type482 { get; set; } + public global::System.Collections.Generic.IList? Type482 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type483 { get; set; } + public global::System.Collections.Generic.IList? Type483 { get; set; } /// /// /// - public global::Vectara.ListAgentsResponse? Type484 { get; set; } + public global::System.Collections.Generic.IList? Type484 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type485 { get; set; } + public global::Vectara.AgentStep? Type485 { get; set; } /// /// /// - public global::Vectara.CreateAgentRequest? Type486 { get; set; } + public global::Vectara.CompactionConfig? Type486 { get; set; } /// /// /// - public global::Vectara.UpdateFirstAgentStep? Type487 { get; set; } + public global::Vectara.CompactionConfigToolEventPolicy? Type487 { get; set; } /// /// /// - public global::Vectara.UpdateAgentStep? Type488 { get; set; } + public global::Vectara.ToolOutputOffloadingConfiguration? Type488 { get; set; } /// /// /// - public global::Vectara.UpdateAgentRequest? Type489 { get; set; } + public global::Vectara.ToolOutputOffloadingConfigurationMode? Type489 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type490 { get; set; } + public global::Vectara.Agent? Type490 { get; set; } /// /// /// - public global::Vectara.InputTokens? Type491 { get; set; } + public global::System.Collections.Generic.Dictionary? Type491 { get; set; } /// /// /// - public global::Vectara.OutputTokens? Type492 { get; set; } + public global::System.Collections.Generic.Dictionary? Type492 { get; set; } /// /// /// - public global::Vectara.SessionContextUsage? Type493 { get; set; } + public global::System.Collections.Generic.Dictionary? Type493 { get; set; } /// /// /// - public global::Vectara.AgentSession? Type494 { get; set; } + public global::Vectara.ListAgentsResponse? Type494 { get; set; } /// /// /// - public global::Vectara.ListAgentSessionsResponse? Type495 { get; set; } + public global::System.Collections.Generic.IList? Type495 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type496 { get; set; } + public global::Vectara.CreateAgentRequest? Type496 { get; set; } /// /// /// - public global::Vectara.CreateAgentSessionRequest? Type497 { get; set; } + public global::Vectara.UpdateFirstAgentStep? Type497 { get; set; } /// /// /// - public global::Vectara.CreateAgentSessionRequestFromSession? Type498 { get; set; } + public global::Vectara.UpdateAgentStep? Type498 { get; set; } /// /// /// - public global::Vectara.UpdateAgentSessionRequest? Type499 { get; set; } + public global::Vectara.UpdateAgentRequest? Type499 { get; set; } /// /// /// - public global::Vectara.AgentEventBase? Type500 { get; set; } + public global::System.Collections.Generic.Dictionary? Type500 { get; set; } /// /// /// - public global::Vectara.AgentTextInput? Type501 { get; set; } + public global::Vectara.InputTokens? Type501 { get; set; } /// /// /// - public global::Vectara.AgentSkillInput? Type502 { get; set; } + public global::Vectara.OutputTokens? Type502 { get; set; } /// /// /// - public global::Vectara.AgentInput? Type503 { get; set; } + public global::Vectara.SessionContextUsage? Type503 { get; set; } /// /// /// - public global::Vectara.AgentInputDiscriminator? Type504 { get; set; } + public global::Vectara.AgentSession? Type504 { get; set; } /// /// /// - public global::Vectara.AgentInputDiscriminatorType? Type505 { get; set; } + public global::Vectara.ListAgentSessionsResponse? Type505 { get; set; } /// /// /// - public global::Vectara.InputMessageEvent? Type506 { get; set; } + public global::System.Collections.Generic.IList? Type506 { get; set; } /// /// /// - public global::Vectara.InputMessageEventVariant2? Type507 { get; set; } + public global::Vectara.CreateAgentSessionRequest? Type507 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type508 { get; set; } + public global::Vectara.CreateAgentSessionRequestFromSession? Type508 { get; set; } /// /// /// - public global::Vectara.SkillLoadEvent? Type509 { get; set; } + public global::Vectara.UpdateAgentSessionRequest? Type509 { get; set; } /// /// /// - public global::Vectara.SkillLoadEventVariant2? Type510 { get; set; } + public global::Vectara.AgentEventBase? Type510 { get; set; } /// /// /// - public global::Vectara.ArtifactReference? Type511 { get; set; } + public global::Vectara.AgentTextInput? Type511 { get; set; } /// /// /// - public global::Vectara.ArtifactUploadEvent? Type512 { get; set; } + public global::Vectara.AgentSkillInput? Type512 { get; set; } /// /// /// - public global::Vectara.ArtifactUploadEventVariant2? Type513 { get; set; } + public global::Vectara.AgentInput? Type513 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type514 { get; set; } + public global::Vectara.AgentInputDiscriminator? Type514 { get; set; } /// /// /// - public global::Vectara.ToolInputEvent? Type515 { get; set; } + public global::Vectara.AgentInputDiscriminatorType? Type515 { get; set; } /// /// /// - public global::Vectara.ToolInputEventVariant2? Type516 { get; set; } + public global::Vectara.InputMessageEvent? Type516 { get; set; } /// /// /// - public global::Vectara.ToolOutputEvent? Type517 { get; set; } + public global::Vectara.InputMessageEventVariant2? Type517 { get; set; } /// /// /// - public global::Vectara.ToolOutputEventVariant2? Type518 { get; set; } + public global::System.Collections.Generic.IList? Type518 { get; set; } /// /// /// - public global::Vectara.ThinkingEvent? Type519 { get; set; } + public global::Vectara.SkillLoadEvent? Type519 { get; set; } /// /// /// - public global::Vectara.ThinkingEventVariant2? Type520 { get; set; } + public global::Vectara.SkillLoadEventVariant2? Type520 { get; set; } /// /// /// - public global::Vectara.AgentOutputEvent? Type521 { get; set; } + public global::Vectara.ArtifactReference? Type521 { get; set; } /// /// /// - public global::Vectara.AgentOutputEventVariant2? Type522 { get; set; } + public global::Vectara.ArtifactUploadEvent? Type522 { get; set; } /// /// /// - public global::Vectara.StructuredOutputEvent? Type523 { get; set; } + public global::Vectara.ArtifactUploadEventVariant2? Type523 { get; set; } /// /// /// - public global::Vectara.StructuredOutputEventVariant2? Type524 { get; set; } + public global::System.Collections.Generic.IList? Type524 { get; set; } /// /// /// - public global::Vectara.ContextLimitExceededEvent? Type525 { get; set; } + public global::Vectara.ToolInputEvent? Type525 { get; set; } /// /// /// - public global::Vectara.ContextLimitExceededEventVariant2? Type526 { get; set; } + public global::Vectara.ToolInputEventVariant2? Type526 { get; set; } /// /// /// - public global::Vectara.StepTransitionLimitExceededEvent? Type527 { get; set; } + public global::Vectara.ToolOutputEvent? Type527 { get; set; } /// /// /// - public global::Vectara.StepTransitionLimitExceededEventVariant2? Type528 { get; set; } + public global::Vectara.ToolOutputEventVariant2? Type528 { get; set; } /// /// /// - public global::Vectara.SessionInterruptedEvent? Type529 { get; set; } + public global::Vectara.ThinkingEvent? Type529 { get; set; } /// /// /// - public global::Vectara.SessionInterruptedEventVariant2? Type530 { get; set; } + public global::Vectara.ThinkingEventVariant2? Type530 { get; set; } /// /// /// - public global::Vectara.ImageReadEvent? Type531 { get; set; } + public global::Vectara.AgentOutputEvent? Type531 { get; set; } /// /// /// - public global::Vectara.ImageReadEventVariant2? Type532 { get; set; } + public global::Vectara.AgentOutputEventVariant2? Type532 { get; set; } /// /// /// - public global::Vectara.ImageReadEventVariant2Detail? Type533 { get; set; } + public global::Vectara.StructuredOutputEvent? Type533 { get; set; } /// /// /// - public global::Vectara.StepTransitionEvent? Type534 { get; set; } + public global::Vectara.StructuredOutputEventVariant2? Type534 { get; set; } /// /// /// - public global::Vectara.StepTransitionEventVariant2? Type535 { get; set; } + public global::Vectara.ContextLimitExceededEvent? Type535 { get; set; } /// /// /// - public global::Vectara.CompactionEvent? Type536 { get; set; } + public global::Vectara.ContextLimitExceededEventVariant2? Type536 { get; set; } /// /// /// - public global::Vectara.CompactionEventVariant2? Type537 { get; set; } + public global::Vectara.StepTransitionLimitExceededEvent? Type537 { get; set; } /// /// /// - public global::Vectara.AgentEvent? Type538 { get; set; } + public global::Vectara.StepTransitionLimitExceededEventVariant2? Type538 { get; set; } /// /// /// - public global::Vectara.AgentEventDiscriminator? Type539 { get; set; } + public global::Vectara.SessionInterruptedEvent? Type539 { get; set; } /// /// /// - public global::Vectara.AgentEventDiscriminatorType? Type540 { get; set; } + public global::Vectara.SessionInterruptedEventVariant2? Type540 { get; set; } /// /// /// - public global::Vectara.ListAgentEventsResponse? Type541 { get; set; } + public global::Vectara.ImageReadEvent? Type541 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type542 { get; set; } + public global::Vectara.ImageReadEventVariant2? Type542 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestBase? Type543 { get; set; } + public global::Vectara.ImageReadEventVariant2Detail? Type543 { get; set; } /// /// /// - public global::Vectara.InputBehavior? Type544 { get; set; } + public global::Vectara.StepTransitionEvent? Type544 { get; set; } /// /// /// - public global::Vectara.CreateInputMessageRequest? Type545 { get; set; } + public global::Vectara.StepTransitionEventVariant2? Type545 { get; set; } /// /// /// - public global::Vectara.CreateInputMessageRequestVariant2? Type546 { get; set; } + public global::Vectara.CompactionEvent? Type546 { get; set; } /// /// /// - public global::Vectara.CreateInterruptRequest? Type547 { get; set; } + public global::Vectara.CompactionEventVariant2? Type547 { get; set; } /// /// /// - public global::Vectara.CreateInterruptRequestVariant2? Type548 { get; set; } + public global::Vectara.AgentEvent? Type548 { get; set; } /// /// /// - public global::Vectara.CreateCompactRequest? Type549 { get; set; } + public global::Vectara.AgentEventDiscriminator? Type549 { get; set; } /// /// /// - public global::Vectara.CreateCompactRequestVariant2? Type550 { get; set; } + public global::Vectara.AgentEventDiscriminatorType? Type550 { get; set; } /// /// /// - public global::Vectara.CreateInputRequest? Type551 { get; set; } + public global::Vectara.ListAgentEventsResponse? Type551 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestDiscriminator? Type552 { get; set; } + public global::System.Collections.Generic.IList? Type552 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestDiscriminatorType? Type553 { get; set; } + public global::Vectara.CreateInputRequestBase? Type553 { get; set; } /// /// /// - public global::Vectara.AgentResponse? Type554 { get; set; } + public global::Vectara.InputBehavior? Type554 { get; set; } /// /// /// - public global::Vectara.StreamingAgentOutput? Type555 { get; set; } + public global::Vectara.CreateInputMessageRequest? Type555 { get; set; } /// /// /// - public global::Vectara.StreamingAgentOutputEnd? Type556 { get; set; } + public global::Vectara.CreateInputMessageRequestVariant2? Type556 { get; set; } /// /// /// - public global::Vectara.StreamingThinking? Type557 { get; set; } + public global::Vectara.CreateInterruptRequest? Type557 { get; set; } /// /// /// - public global::Vectara.StreamingThinkingEnd? Type558 { get; set; } + public global::Vectara.CreateInterruptRequestVariant2? Type558 { get; set; } /// /// /// - public global::Vectara.ContextConsumedEvent? Type559 { get; set; } + public global::Vectara.CreateCompactRequest? Type559 { get; set; } /// /// /// - public global::Vectara.CompactionStartedEvent? Type560 { get; set; } + public global::Vectara.CreateCompactRequestVariant2? Type560 { get; set; } /// /// /// - public global::Vectara.CompactionStartedEventVariant2? Type561 { get; set; } + public global::Vectara.CreateInputRequest? Type561 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponse? Type562 { get; set; } + public global::Vectara.CreateInputRequestDiscriminator? Type562 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminator? Type563 { get; set; } + public global::Vectara.CreateInputRequestDiscriminatorType? Type563 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminatorType? Type564 { get; set; } + public global::Vectara.AgentResponse? Type564 { get; set; } /// /// /// - public global::Vectara.SessionArtifact? Type565 { get; set; } + public global::Vectara.StreamingAgentOutput? Type565 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsResponse? Type566 { get; set; } + public global::Vectara.StreamingAgentOutputEnd? Type566 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type567 { get; set; } + public global::Vectara.StreamingThinking? Type567 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfiguration? Type568 { get; set; } + public global::Vectara.StreamingThinkingEnd? Type568 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfigurationType? Type569 { get; set; } + public global::Vectara.ContextConsumedEvent? Type569 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfiguration? Type570 { get; set; } + public global::Vectara.CompactionStartedEvent? Type570 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfigurationType? Type571 { get; set; } + public global::Vectara.CompactionStartedEventVariant2? Type571 { get; set; } /// /// /// - public global::Vectara.ScheduleConfiguration? Type572 { get; set; } + public global::Vectara.AgentStreamedResponse? Type572 { get; set; } /// /// /// - public global::Vectara.AgentSchedule? Type573 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminator? Type573 { get; set; } /// /// /// - public global::Vectara.ListAgentSchedulesResponse? Type574 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminatorType? Type574 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type575 { get; set; } + public global::Vectara.SessionArtifact? Type575 { get; set; } /// /// /// - public global::Vectara.CreateAgentScheduleRequest? Type576 { get; set; } + public global::Vectara.ListSessionArtifactsResponse? Type576 { get; set; } /// /// /// - public global::Vectara.UpdateAgentScheduleRequest? Type577 { get; set; } + public global::System.Collections.Generic.IList? Type577 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecution? Type578 { get; set; } + public global::Vectara.IntervalScheduleConfiguration? Type578 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecutionStatus? Type579 { get; set; } + public global::Vectara.IntervalScheduleConfigurationType? Type579 { get; set; } /// /// /// - public global::Vectara.ListAgentScheduleExecutionsResponse? Type580 { get; set; } + public global::Vectara.CronScheduleConfiguration? Type580 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type581 { get; set; } + public global::Vectara.CronScheduleConfigurationType? Type581 { get; set; } /// /// /// - public global::Vectara.AgentIdentityMode? Type582 { get; set; } + public global::Vectara.ScheduleConfiguration? Type582 { get; set; } /// /// /// - public global::Vectara.AgentIdentity? Type583 { get; set; } + public global::Vectara.AgentSchedule? Type583 { get; set; } /// /// /// - public global::Vectara.UpdateAgentIdentityRequest? Type584 { get; set; } + public global::Vectara.ListAgentSchedulesResponse? Type584 { get; set; } /// /// /// - public global::Vectara.AgentSecrets? Type585 { get; set; } + public global::System.Collections.Generic.IList? Type585 { get; set; } /// /// /// - public global::Vectara.ReplaceAgentSecretsRequest? Type586 { get; set; } + public global::Vectara.CreateAgentScheduleRequest? Type586 { get; set; } /// /// /// - public global::Vectara.UpdateAgentSecretsRequest? Type587 { get; set; } + public global::Vectara.UpdateAgentScheduleRequest? Type587 { get; set; } /// /// /// - public global::Vectara.SlackConnectorConfiguration? Type588 { get; set; } + public global::Vectara.AgentScheduleExecution? Type588 { get; set; } /// /// /// - public global::Vectara.ConnectorConfiguration? Type589 { get; set; } + public global::Vectara.AgentScheduleExecutionStatus? Type589 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminator? Type590 { get; set; } + public global::Vectara.ListAgentScheduleExecutionsResponse? Type590 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminatorType? Type591 { get; set; } + public global::System.Collections.Generic.IList? Type591 { get; set; } /// /// /// - public global::Vectara.AgentConnector? Type592 { get; set; } + public global::Vectara.AgentIdentityMode? Type592 { get; set; } /// /// /// - public global::Vectara.AgentConnectorType? Type593 { get; set; } + public global::Vectara.AgentIdentity? Type593 { get; set; } /// /// /// - public global::Vectara.AgentConnectorStatus? Type594 { get; set; } + public global::Vectara.UpdateAgentIdentityRequest? Type594 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsResponse? Type595 { get; set; } + public global::Vectara.AgentSecrets? Type595 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type596 { get; set; } + public global::Vectara.ReplaceAgentSecretsRequest? Type596 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequest? Type597 { get; set; } + public global::Vectara.UpdateAgentSecretsRequest? Type597 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequestType? Type598 { get; set; } + public global::Vectara.SlackConnectorConfiguration? Type598 { get; set; } /// /// /// - public global::Vectara.UpdateAgentConnectorRequest? Type599 { get; set; } + public global::Vectara.ConnectorConfiguration? Type599 { get; set; } /// /// /// - public global::Vectara.PipelineStatus? Type600 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminator? Type600 { get; set; } /// /// /// - public global::Vectara.BaseS3SourceConfiguration? Type601 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminatorType? Type601 { get; set; } /// /// /// - public global::Vectara.S3SourceConfiguration? Type602 { get; set; } + public global::Vectara.AgentConnector? Type602 { get; set; } /// /// /// - public global::Vectara.BaseWebSource? Type603 { get; set; } + public global::Vectara.AgentConnectorType? Type603 { get; set; } /// /// /// - public global::Vectara.SitemapPagesSource? Type604 { get; set; } + public global::Vectara.AgentConnectorStatus? Type604 { get; set; } /// /// /// - public global::Vectara.BaseCrawlPagesSource? Type605 { get; set; } + public global::Vectara.ListAgentConnectorsResponse? Type605 { get; set; } /// /// /// - public global::Vectara.CrawlPagesSource? Type606 { get; set; } + public global::System.Collections.Generic.IList? Type606 { get; set; } /// /// /// - public global::Vectara.CrawlPagesSourceVariant2? Type607 { get; set; } + public global::Vectara.CreateAgentConnectorRequest? Type607 { get; set; } /// /// /// - public global::Vectara.SitemapCrawlPagesSource? Type608 { get; set; } + public global::Vectara.CreateAgentConnectorRequestType? Type608 { get; set; } /// /// /// - public global::Vectara.SitemapCrawlPagesSourceVariant2? Type609 { get; set; } + public global::Vectara.UpdateAgentConnectorRequest? Type609 { get; set; } /// /// /// - public global::Vectara.WebPagesSource? Type610 { get; set; } + public global::Vectara.PipelineStatus? Type610 { get; set; } /// /// /// - public global::Vectara.WebPagesSourceDiscriminator? Type611 { get; set; } + public global::Vectara.BaseS3SourceConfiguration? Type611 { get; set; } /// /// /// - public global::Vectara.WebPagesSourceDiscriminatorType? Type612 { get; set; } + public global::Vectara.S3SourceConfiguration? Type612 { get; set; } /// /// /// - public global::Vectara.WebSourceConfiguration? Type613 { get; set; } + public global::Vectara.BaseWebSource? Type613 { get; set; } /// /// /// - public global::Vectara.WebSourceConfigurationVariant2? Type614 { get; set; } + public global::Vectara.SitemapPagesSource? Type614 { get; set; } /// /// /// - public global::Vectara.PipelineSource? Type615 { get; set; } + public global::Vectara.BaseCrawlPagesSource? Type615 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminator? Type616 { get; set; } + public global::Vectara.CrawlPagesSource? Type616 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminatorType? Type617 { get; set; } + public global::Vectara.CrawlPagesSourceVariant2? Type617 { get; set; } /// /// /// - public global::Vectara.CronTriggerConfiguration? Type618 { get; set; } + public global::Vectara.SitemapCrawlPagesSource? Type618 { get; set; } /// /// /// - public global::Vectara.IntervalTriggerConfiguration? Type619 { get; set; } + public global::Vectara.SitemapCrawlPagesSourceVariant2? Type619 { get; set; } /// /// /// - public global::Vectara.ManualTriggerConfiguration? Type620 { get; set; } + public global::Vectara.WebPagesSource? Type620 { get; set; } /// /// /// - public global::Vectara.PipelineTrigger? Type621 { get; set; } + public global::Vectara.WebPagesSourceDiscriminator? Type621 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminator? Type622 { get; set; } + public global::Vectara.WebPagesSourceDiscriminatorType? Type622 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminatorType? Type623 { get; set; } + public global::Vectara.WebSourceConfiguration? Type623 { get; set; } /// /// /// - public global::Vectara.ConditionVerification? Type624 { get; set; } + public global::Vectara.WebSourceConfigurationVariant2? Type624 { get; set; } /// /// /// - public global::Vectara.AgentVerification? Type625 { get; set; } + public global::Vectara.PipelineSource? Type625 { get; set; } /// /// /// - public global::Vectara.PipelineVerification? Type626 { get; set; } + public global::Vectara.PipelineSourceDiscriminator? Type626 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminator? Type627 { get; set; } + public global::Vectara.PipelineSourceDiscriminatorType? Type627 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminatorType? Type628 { get; set; } + public global::Vectara.CronTriggerConfiguration? Type628 { get; set; } /// /// /// - public global::Vectara.AgentTransformConfiguration? Type629 { get; set; } + public global::Vectara.IntervalTriggerConfiguration? Type629 { get; set; } /// /// /// - public global::Vectara.PipelineTransform? Type630 { get; set; } + public global::Vectara.ManualTriggerConfiguration? Type630 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminator? Type631 { get; set; } + public global::Vectara.PipelineTrigger? Type631 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminatorType? Type632 { get; set; } + public global::Vectara.PipelineTriggerDiscriminator? Type632 { get; set; } /// /// /// - public global::Vectara.PipelineSyncMode? Type633 { get; set; } + public global::Vectara.PipelineTriggerDiscriminatorType? Type633 { get; set; } /// /// /// - public global::Vectara.PipelineWatermark? Type634 { get; set; } + public global::Vectara.ConditionVerification? Type634 { get; set; } /// /// /// - public global::Vectara.Pipeline? Type635 { get; set; } + public global::Vectara.AgentVerification? Type635 { get; set; } /// /// /// - public global::Vectara.ListPipelinesResponse? Type636 { get; set; } + public global::Vectara.PipelineVerification? Type636 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type637 { get; set; } + public global::Vectara.PipelineVerificationDiscriminator? Type637 { get; set; } /// /// /// - public global::Vectara.CreatePipelineRequest? Type638 { get; set; } + public global::Vectara.PipelineVerificationDiscriminatorType? Type638 { get; set; } /// /// /// - public global::Vectara.UpdateS3SourceConfiguration? Type639 { get; set; } + public global::Vectara.AgentTransformConfiguration? Type639 { get; set; } /// /// /// - public global::Vectara.UpdateWebSourceConfiguration? Type640 { get; set; } + public global::Vectara.PipelineTransform? Type640 { get; set; } /// /// /// - public global::Vectara.UpdateWebSourceConfigurationVariant2? Type641 { get; set; } + public global::Vectara.PipelineTransformDiscriminator? Type641 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSource? Type642 { get; set; } + public global::Vectara.PipelineTransformDiscriminatorType? Type642 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminator? Type643 { get; set; } + public global::Vectara.PipelineSyncMode? Type643 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type644 { get; set; } + public global::Vectara.PipelineWatermark? Type644 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineRequest? Type645 { get; set; } + public global::Vectara.Pipeline? Type645 { get; set; } /// /// /// - public global::Vectara.PipelineRunStatus? Type646 { get; set; } + public global::Vectara.ListPipelinesResponse? Type646 { get; set; } /// /// /// - public global::Vectara.PipelineRunTriggerType? Type647 { get; set; } + public global::System.Collections.Generic.IList? Type647 { get; set; } /// /// /// - public global::Vectara.PipelineRun? Type648 { get; set; } + public global::Vectara.CreatePipelineRequest? Type648 { get; set; } /// /// /// - public global::Vectara.DeadLetterStatus? Type649 { get; set; } + public global::Vectara.UpdateS3SourceConfiguration? Type649 { get; set; } /// /// /// - public global::Vectara.DeadLetterOrigin? Type650 { get; set; } + public global::Vectara.UpdateWebSourceConfiguration? Type650 { get; set; } /// /// /// - public global::Vectara.PipelineDeadLetterEntry? Type651 { get; set; } + public global::Vectara.UpdateWebSourceConfigurationVariant2? Type651 { get; set; } /// /// /// - public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type652 { get; set; } + public global::Vectara.UpdatePipelineSource? Type652 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type653 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminator? Type653 { get; set; } /// /// /// - public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type654 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type654 { get; set; } /// /// /// - public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type655 { get; set; } + public global::Vectara.UpdatePipelineRequest? Type655 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunsResponse? Type656 { get; set; } + public global::Vectara.PipelineRunStatus? Type656 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type657 { get; set; } + public global::Vectara.PipelineRunTriggerType? Type657 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventType? Type658 { get; set; } + public global::Vectara.PipelineRun? Type658 { get; set; } /// /// /// - public global::Vectara.SortOrder? Type659 { get; set; } + public global::Vectara.DeadLetterStatus? Type659 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventBase? Type660 { get; set; } + public global::Vectara.DeadLetterOrigin? Type660 { get; set; } /// /// /// - public global::Vectara.RunStartedEvent? Type661 { get; set; } + public global::Vectara.PipelineDeadLetterEntry? Type661 { get; set; } /// /// /// - public global::Vectara.RunStartedEventVariant2? Type662 { get; set; } + public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type662 { get; set; } /// /// /// - public global::Vectara.RunCompletedEventStatus? Type663 { get; set; } + public global::System.Collections.Generic.IList? Type663 { get; set; } /// /// /// - public global::Vectara.RunCompletedEvent? Type664 { get; set; } + public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type664 { get; set; } /// /// /// - public global::Vectara.RunCompletedEventVariant2? Type665 { get; set; } + public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type665 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEventStatus? Type666 { get; set; } + public global::Vectara.ListPipelineRunsResponse? Type666 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEvent? Type667 { get; set; } + public global::System.Collections.Generic.IList? Type667 { get; set; } /// /// /// - public global::Vectara.RecordProcessingEventVariant2? Type668 { get; set; } + public global::Vectara.PipelineRunEventType? Type668 { get; set; } /// /// /// - public global::Vectara.WatermarkAdvancedEvent? Type669 { get; set; } + public global::Vectara.SortOrder? Type669 { get; set; } /// /// /// - public global::Vectara.WatermarkAdvancedEventVariant2? Type670 { get; set; } + public global::Vectara.PipelineRunEventBase? Type670 { get; set; } /// /// /// - public global::Vectara.PipelineRunEvent? Type671 { get; set; } + public global::Vectara.RunStartedEvent? Type671 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventDiscriminator? Type672 { get; set; } + public global::Vectara.RunStartedEventVariant2? Type672 { get; set; } /// /// /// - public global::Vectara.PipelineRunEventDiscriminatorType? Type673 { get; set; } + public global::Vectara.RunCompletedEventStatus? Type673 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunEventsResponse? Type674 { get; set; } + public global::Vectara.RunCompletedEvent? Type674 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type675 { get; set; } + public global::Vectara.RunCompletedEventVariant2? Type675 { get; set; } /// /// /// - public global::Vectara.AgentTrace? Type676 { get; set; } + public global::Vectara.RecordProcessingEventStatus? Type676 { get; set; } /// /// /// - public global::Vectara.AgentTraceStatus? Type677 { get; set; } + public global::Vectara.RecordProcessingEvent? Type677 { get; set; } /// /// /// - public global::Vectara.ListAgentTracesResponse? Type678 { get; set; } + public global::Vectara.RecordProcessingEventVariant2? Type678 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type679 { get; set; } + public global::Vectara.WatermarkAdvancedEvent? Type679 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanStatus? Type680 { get; set; } + public global::Vectara.WatermarkAdvancedEventVariant2? Type680 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanBase? Type681 { get; set; } + public global::Vectara.PipelineRunEvent? Type681 { get; set; } /// /// /// - public global::Vectara.AgentTraceInputFile? Type682 { get; set; } + public global::Vectara.PipelineRunEventDiscriminator? Type682 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributes? Type683 { get; set; } + public global::Vectara.PipelineRunEventDiscriminatorType? Type683 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributesOutputType? Type684 { get; set; } + public global::Vectara.ListPipelineRunEventsResponse? Type684 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type685 { get; set; } + public global::System.Collections.Generic.IList? Type685 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanContent? Type686 { get; set; } + public global::Vectara.MetricKind? Type686 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpan? Type687 { get; set; } + public global::Vectara.MetricDescriptor? Type687 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpanVariant2? Type688 { get; set; } + public global::Vectara.ListMetricsResponse? Type688 { get; set; } /// /// /// - public global::Vectara.ChatSpanAttributes? Type689 { get; set; } + public global::System.Collections.Generic.IList? Type689 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpan? Type690 { get; set; } + public global::Vectara.MetricSeriesBase? Type690 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpanVariant2? Type691 { get; set; } + public global::Vectara.ScalarMetricPoint? Type691 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanAttributes? Type692 { get; set; } + public global::Vectara.CounterMetricSeries? Type692 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanContent? Type693 { get; set; } + public global::Vectara.CounterMetricSeriesVariant2? Type693 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpan? Type694 { get; set; } + public global::System.Collections.Generic.IList? Type694 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpanVariant2? Type695 { get; set; } + public global::Vectara.GaugeMetricSeries? Type695 { get; set; } /// /// /// - public global::Vectara.ThinkingSpanContent? Type696 { get; set; } + public global::Vectara.GaugeMetricSeriesVariant2? Type696 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpan? Type697 { get; set; } + public global::Vectara.PercentilesMetricPoint? Type697 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpanVariant2? Type698 { get; set; } + public global::Vectara.PercentilesMetricSeries? Type698 { get; set; } /// /// /// - public global::Vectara.OutputSpanContent? Type699 { get; set; } + public global::Vectara.PercentilesMetricSeriesVariant2? Type699 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpan? Type700 { get; set; } + public global::System.Collections.Generic.IList? Type700 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpanVariant2? Type701 { get; set; } + public global::Vectara.HistogramBin? Type701 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanAttributes? Type702 { get; set; } + public global::Vectara.DistributionMetricPoint? Type702 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanContent? Type703 { get; set; } + public global::System.Collections.Generic.IList? Type703 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpan? Type704 { get; set; } + public global::Vectara.DistributionMetricSeries? Type704 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpanVariant2? Type705 { get; set; } + public global::Vectara.DistributionMetricSeriesVariant2? Type705 { get; set; } /// /// /// - public global::Vectara.StepTransitionSpanAttributes? Type706 { get; set; } + public global::System.Collections.Generic.IList? Type706 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpan? Type707 { get; set; } + public global::Vectara.MetricSeries? Type707 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpanVariant2? Type708 { get; set; } + public global::Vectara.MetricSeriesDiscriminator? Type708 { get; set; } /// /// /// - public global::Vectara.ImageReadSpanAttributes? Type709 { get; set; } + public global::Vectara.MetricSeriesDiscriminatorKind? Type709 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpan? Type710 { get; set; } + public global::Vectara.AgentTrace? Type710 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpanVariant2? Type711 { get; set; } + public global::Vectara.AgentTraceStatus? Type711 { get; set; } /// /// /// - public global::Vectara.CompactionSpanAttributes? Type712 { get; set; } + public global::Vectara.ListAgentTracesResponse? Type712 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpan? Type713 { get; set; } + public global::System.Collections.Generic.IList? Type713 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpanVariant2? Type714 { get; set; } + public global::Vectara.AgentTraceSpanStatus? Type714 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpan? Type715 { get; set; } + public global::Vectara.AgentTraceSpanBase? Type715 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminator? Type716 { get; set; } + public global::Vectara.AgentTraceInputFile? Type716 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type717 { get; set; } + public global::Vectara.InvokeAgentSpanAttributes? Type717 { get; set; } /// /// /// - public global::Vectara.ListAgentTraceSpansResponse? Type718 { get; set; } + public global::Vectara.InvokeAgentSpanAttributesOutputType? Type718 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type719 { get; set; } + public global::System.Collections.Generic.IList? Type719 { get; set; } /// /// /// - public global::Vectara.Glossary? Type720 { get; set; } + public global::Vectara.InvokeAgentSpanContent? Type720 { get; set; } /// /// /// - public global::Vectara.ListGlossariesResponse? Type721 { get; set; } + public global::Vectara.InvokeAgentTraceSpan? Type721 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type722 { get; set; } + public global::Vectara.InvokeAgentTraceSpanVariant2? Type722 { get; set; } /// /// /// - public global::Vectara.CreateGlossaryRequest? Type723 { get; set; } + public global::Vectara.ChatSpanAttributes? Type723 { get; set; } /// /// /// - public global::Vectara.UpdateGlossaryRequest? Type724 { get; set; } + public global::Vectara.ChatTraceSpan? Type724 { get; set; } /// /// /// - public global::Vectara.GlossaryEntry? Type725 { get; set; } + public global::Vectara.ChatTraceSpanVariant2? Type725 { get; set; } /// /// /// - public global::Vectara.GlossaryEntriesResponse? Type726 { get; set; } + public global::Vectara.ExecuteToolSpanAttributes? Type726 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type727 { get; set; } + public global::Vectara.ExecuteToolSpanContent? Type727 { get; set; } /// /// /// - public global::Vectara.UpsertGlossaryEntriesRequest? Type728 { get; set; } + public global::Vectara.ExecuteToolTraceSpan? Type728 { get; set; } /// /// /// - public global::Vectara.DeleteGlossaryEntriesRequest? Type729 { get; set; } + public global::Vectara.ExecuteToolTraceSpanVariant2? Type729 { get; set; } /// /// /// - public global::Vectara.GetOAuthTokenRequest? Type730 { get; set; } + public global::Vectara.ThinkingSpanContent? Type730 { get; set; } /// /// /// - public global::Vectara.CreateCorpusDocumentWaitFor? Type731 { get; set; } + public global::Vectara.ThinkingTraceSpan? Type731 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type732 { get; set; } + public global::Vectara.ThinkingTraceSpanVariant2? Type732 { get; set; } /// /// /// - public global::Vectara.ListToolServersType? Type733 { get; set; } + public global::Vectara.OutputSpanContent? Type733 { get; set; } /// /// /// - public global::Vectara.ListToolsType? Type734 { get; set; } + public global::Vectara.OutputTraceSpan? Type734 { get; set; } /// /// /// - public global::Vectara.ListInstructionsType? Type735 { get; set; } + public global::Vectara.OutputTraceSpanVariant2? Type735 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsSortBy? Type736 { get; set; } + public global::Vectara.GuardrailSpanAttributes? Type736 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsOrderBy? Type737 { get; set; } + public global::Vectara.GuardrailSpanContent? Type737 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsType? Type738 { get; set; } + public global::Vectara.GuardrailTraceSpan? Type738 { get; set; } /// /// /// - public global::Vectara.ListPipelinesSourceType? Type739 { get; set; } + public global::Vectara.GuardrailTraceSpanVariant2? Type739 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type740 { get; set; } + public global::Vectara.StepTransitionSpanAttributes? Type740 { get; set; } /// /// /// - public global::Vectara.ListTracesStatus? Type741 { get; set; } + public global::Vectara.StepTransitionTraceSpan? Type741 { get; set; } /// /// /// - public global::Vectara.ListTracesErrorType? Type742 { get; set; } + public global::Vectara.StepTransitionTraceSpanVariant2? Type742 { get; set; } /// /// /// - public global::Vectara.ListTracesOperation? Type743 { get; set; } + public global::Vectara.ImageReadSpanAttributes? Type743 { get; set; } /// /// /// - public global::Vectara.ListTracesToolErrorType? Type744 { get; set; } + public global::Vectara.ImageReadTraceSpan? Type744 { get; set; } /// /// /// - public global::Vectara.ListTraceSpansOperation? Type745 { get; set; } + public global::Vectara.ImageReadTraceSpanVariant2? Type745 { get; set; } /// /// /// - public global::Vectara.AllOf? Type746 { get; set; } + public global::Vectara.CompactionSpanAttributes? Type746 { get; set; } /// /// /// - public global::Vectara.CreateUserResponse2? Type747 { get; set; } + public global::Vectara.CompactionTraceSpan? Type747 { get; set; } /// /// /// - public global::Vectara.ResetUserPasswordResponse? Type748 { get; set; } + public global::Vectara.CompactionTraceSpanVariant2? Type748 { get; set; } /// /// /// - public global::Vectara.GetTokenResponse? Type749 { get; set; } + public global::Vectara.AgentTraceSpan? Type749 { get; set; } + /// + /// + /// + public global::Vectara.AgentTraceSpanDiscriminator? Type750 { get; set; } + /// + /// + /// + public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type751 { get; set; } + /// + /// + /// + public global::Vectara.ListAgentTraceSpansResponse? Type752 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type753 { get; set; } + /// + /// + /// + public global::Vectara.Glossary? Type754 { get; set; } + /// + /// + /// + public global::Vectara.ListGlossariesResponse? Type755 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type756 { get; set; } + /// + /// + /// + public global::Vectara.CreateGlossaryRequest? Type757 { get; set; } + /// + /// + /// + public global::Vectara.UpdateGlossaryRequest? Type758 { get; set; } + /// + /// + /// + public global::Vectara.GlossaryEntry? Type759 { get; set; } + /// + /// + /// + public global::Vectara.GlossaryEntriesResponse? Type760 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type761 { get; set; } + /// + /// + /// + public global::Vectara.UpsertGlossaryEntriesRequest? Type762 { get; set; } + /// + /// + /// + public global::Vectara.DeleteGlossaryEntriesRequest? Type763 { get; set; } + /// + /// + /// + public global::Vectara.GetOAuthTokenRequest? Type764 { get; set; } + /// + /// + /// + public global::Vectara.CreateCorpusDocumentWaitFor? Type765 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type766 { get; set; } + /// + /// + /// + public global::Vectara.ListToolServersType? Type767 { get; set; } + /// + /// + /// + public global::Vectara.ListToolsType? Type768 { get; set; } + /// + /// + /// + public global::Vectara.ListInstructionsType? Type769 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsSortBy? Type770 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsOrderBy? Type771 { get; set; } + /// + /// + /// + public global::Vectara.ListAgentConnectorsType? Type772 { get; set; } + /// + /// + /// + public global::Vectara.ListPipelinesSourceType? Type773 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type774 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesStatus? Type775 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesErrorType? Type776 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesOperation? Type777 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesToolErrorType? Type778 { get; set; } + /// + /// + /// + public global::Vectara.ListTraceSpansOperation? Type779 { get; set; } + /// + /// + /// + public global::Vectara.AllOf? Type780 { get; set; } + /// + /// + /// + public global::Vectara.CreateUserResponse2? Type781 { get; set; } + /// + /// + /// + public global::Vectara.ResetUserPasswordResponse? Type782 { get; set; } + /// + /// + /// + public global::Vectara.GetTokenResponse? Type783 { get; set; } /// /// @@ -3305,30 +3441,50 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType69 { get; set; } + public global::System.Collections.Generic.List? ListType69 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType70 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType71 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType72 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType73 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType70 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType71 { get; set; } + public global::System.Collections.Generic.List? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType79 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType75 { get; set; } + public global::System.Collections.Generic.List? ListType80 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpanBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpanBase.g.cs index 3800370d..a1486a05 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpanBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpanBase.g.cs @@ -63,6 +63,13 @@ public sealed partial class AgentTraceSpanBase [global::System.Text.Json.Serialization.JsonPropertyName("step_name")] public string? StepName { get; set; } + /// + /// Whether this span has child spans. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_children")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasChildren { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -85,6 +92,9 @@ public sealed partial class AgentTraceSpanBase /// /// The status of an agent trace span. /// + /// + /// Whether this span has child spans. + /// /// /// The identifier of the parent span, if any. /// @@ -105,6 +115,7 @@ public AgentTraceSpanBase( string traceId, global::System.DateTime startedAt, global::Vectara.AgentTraceSpanStatus status, + bool hasChildren, string? parentSpanId, long? durationMs, string? errorMessage, @@ -118,6 +129,7 @@ public AgentTraceSpanBase( this.Status = status; this.ErrorMessage = errorMessage; this.StepName = stepName; + this.HasChildren = hasChildren; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeries.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeries.Json.g.cs new file mode 100644 index 00000000..6004eaf2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeries.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct CounterMetricSeries + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.CounterMetricSeries? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CounterMetricSeries), + jsonSerializerContext) as global::Vectara.CounterMetricSeries?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.CounterMetricSeries? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.CounterMetricSeries), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CounterMetricSeries?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeries.g.cs new file mode 100644 index 00000000..1dcd9899 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeries.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A series of counter values (monotonic count or sum). + /// + public readonly partial struct CounterMetricSeries : global::System.IEquatable + { + /// + /// Common properties shared by all metric series kinds. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricSeriesBase? Base { get; init; } +#else + public global::Vectara.MetricSeriesBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricSeriesBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricSeriesBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.CounterMetricSeriesVariant2? CounterMetricSeriesVariant2 { get; init; } +#else + public global::Vectara.CounterMetricSeriesVariant2? CounterMetricSeriesVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CounterMetricSeriesVariant2))] +#endif + public bool IsCounterMetricSeriesVariant2 => CounterMetricSeriesVariant2 != null; + + /// + /// + /// + public bool TryPickCounterMetricSeriesVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CounterMetricSeriesVariant2? value) + { + value = CounterMetricSeriesVariant2; + return IsCounterMetricSeriesVariant2; + } + + /// + /// + /// + public global::Vectara.CounterMetricSeriesVariant2 PickCounterMetricSeriesVariant2() => IsCounterMetricSeriesVariant2 + ? CounterMetricSeriesVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'CounterMetricSeriesVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator CounterMetricSeries(global::Vectara.MetricSeriesBase value) => new CounterMetricSeries((global::Vectara.MetricSeriesBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricSeriesBase?(CounterMetricSeries @this) => @this.Base; + + /// + /// + /// + public CounterMetricSeries(global::Vectara.MetricSeriesBase? value) + { + Base = value; + } + + /// + /// + /// + public static CounterMetricSeries FromBase(global::Vectara.MetricSeriesBase? value) => new CounterMetricSeries(value); + + /// + /// + /// + public static implicit operator CounterMetricSeries(global::Vectara.CounterMetricSeriesVariant2 value) => new CounterMetricSeries((global::Vectara.CounterMetricSeriesVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.CounterMetricSeriesVariant2?(CounterMetricSeries @this) => @this.CounterMetricSeriesVariant2; + + /// + /// + /// + public CounterMetricSeries(global::Vectara.CounterMetricSeriesVariant2? value) + { + CounterMetricSeriesVariant2 = value; + } + + /// + /// + /// + public static CounterMetricSeries FromCounterMetricSeriesVariant2(global::Vectara.CounterMetricSeriesVariant2? value) => new CounterMetricSeries(value); + + /// + /// + /// + public CounterMetricSeries( + global::Vectara.MetricSeriesBase? @base, + global::Vectara.CounterMetricSeriesVariant2? counterMetricSeriesVariant2 + ) + { + Base = @base; + CounterMetricSeriesVariant2 = counterMetricSeriesVariant2; + } + + /// + /// + /// + public object? Object => + CounterMetricSeriesVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + CounterMetricSeriesVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsCounterMetricSeriesVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? counterMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsCounterMetricSeriesVariant2 && counterMetricSeriesVariant2 != null) + { + return counterMetricSeriesVariant2(CounterMetricSeriesVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? counterMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCounterMetricSeriesVariant2) + { + counterMetricSeriesVariant2?.Invoke(CounterMetricSeriesVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? counterMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsCounterMetricSeriesVariant2) + { + counterMetricSeriesVariant2?.Invoke(CounterMetricSeriesVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricSeriesBase), + CounterMetricSeriesVariant2, + typeof(global::Vectara.CounterMetricSeriesVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CounterMetricSeries other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CounterMetricSeriesVariant2, other.CounterMetricSeriesVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(CounterMetricSeries obj1, CounterMetricSeries obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CounterMetricSeries obj1, CounterMetricSeries obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CounterMetricSeries o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.Json.g.cs new file mode 100644 index 00000000..1ca3d86c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class CounterMetricSeriesVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.CounterMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.CounterMetricSeriesVariant2), + jsonSerializerContext) as global::Vectara.CounterMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.CounterMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.CounterMetricSeriesVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.CounterMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs new file mode 100644 index 00000000..5215664d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.CounterMetricSeriesVariant2.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class CounterMetricSeriesVariant2 + { + /// + /// Default Value: counter
+ /// Example: counter + ///
+ /// "counter" + /// counter + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } = "counter"; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("points")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Points { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: counter
+ /// Example: counter + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CounterMetricSeriesVariant2( + string kind, + global::System.Collections.Generic.IList points) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Points = points ?? throw new global::System.ArgumentNullException(nameof(points)); + } + + /// + /// Initializes a new instance of the class. + /// + public CounterMetricSeriesVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.Json.g.cs new file mode 100644 index 00000000..5bba184b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class DistributionMetricPoint + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.DistributionMetricPoint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.DistributionMetricPoint), + jsonSerializerContext) as global::Vectara.DistributionMetricPoint; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.DistributionMetricPoint? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.DistributionMetricPoint), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.DistributionMetricPoint; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs new file mode 100644 index 00000000..05cbaa61 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricPoint.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A point in a distribution metric series — a histogram of value-bucketed counts at a time bucket. Only bins with non-zero counts appear. + /// + public sealed partial class DistributionMetricPoint + { + /// + /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bucket_start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime BucketStart { get; set; } + + /// + /// Histogram bins, sorted by `lower_ms` ascending. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bins")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Bins { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + /// + /// Histogram bins, sorted by `lower_ms` ascending. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DistributionMetricPoint( + global::System.DateTime bucketStart, + global::System.Collections.Generic.IList bins) + { + this.BucketStart = bucketStart; + this.Bins = bins ?? throw new global::System.ArgumentNullException(nameof(bins)); + } + + /// + /// Initializes a new instance of the class. + /// + public DistributionMetricPoint() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.Json.g.cs new file mode 100644 index 00000000..e4e1c96b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct DistributionMetricSeries + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.DistributionMetricSeries? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.DistributionMetricSeries), + jsonSerializerContext) as global::Vectara.DistributionMetricSeries?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.DistributionMetricSeries? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.DistributionMetricSeries), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.DistributionMetricSeries?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs new file mode 100644 index 00000000..963fc976 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeries.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A series of histogram aggregates over a value-axis distribution table. + /// + public readonly partial struct DistributionMetricSeries : global::System.IEquatable + { + /// + /// Common properties shared by all metric series kinds. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricSeriesBase? Base { get; init; } +#else + public global::Vectara.MetricSeriesBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricSeriesBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricSeriesBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.DistributionMetricSeriesVariant2? DistributionMetricSeriesVariant2 { get; init; } +#else + public global::Vectara.DistributionMetricSeriesVariant2? DistributionMetricSeriesVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DistributionMetricSeriesVariant2))] +#endif + public bool IsDistributionMetricSeriesVariant2 => DistributionMetricSeriesVariant2 != null; + + /// + /// + /// + public bool TryPickDistributionMetricSeriesVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DistributionMetricSeriesVariant2? value) + { + value = DistributionMetricSeriesVariant2; + return IsDistributionMetricSeriesVariant2; + } + + /// + /// + /// + public global::Vectara.DistributionMetricSeriesVariant2 PickDistributionMetricSeriesVariant2() => IsDistributionMetricSeriesVariant2 + ? DistributionMetricSeriesVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'DistributionMetricSeriesVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator DistributionMetricSeries(global::Vectara.MetricSeriesBase value) => new DistributionMetricSeries((global::Vectara.MetricSeriesBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricSeriesBase?(DistributionMetricSeries @this) => @this.Base; + + /// + /// + /// + public DistributionMetricSeries(global::Vectara.MetricSeriesBase? value) + { + Base = value; + } + + /// + /// + /// + public static DistributionMetricSeries FromBase(global::Vectara.MetricSeriesBase? value) => new DistributionMetricSeries(value); + + /// + /// + /// + public static implicit operator DistributionMetricSeries(global::Vectara.DistributionMetricSeriesVariant2 value) => new DistributionMetricSeries((global::Vectara.DistributionMetricSeriesVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.DistributionMetricSeriesVariant2?(DistributionMetricSeries @this) => @this.DistributionMetricSeriesVariant2; + + /// + /// + /// + public DistributionMetricSeries(global::Vectara.DistributionMetricSeriesVariant2? value) + { + DistributionMetricSeriesVariant2 = value; + } + + /// + /// + /// + public static DistributionMetricSeries FromDistributionMetricSeriesVariant2(global::Vectara.DistributionMetricSeriesVariant2? value) => new DistributionMetricSeries(value); + + /// + /// + /// + public DistributionMetricSeries( + global::Vectara.MetricSeriesBase? @base, + global::Vectara.DistributionMetricSeriesVariant2? distributionMetricSeriesVariant2 + ) + { + Base = @base; + DistributionMetricSeriesVariant2 = distributionMetricSeriesVariant2; + } + + /// + /// + /// + public object? Object => + DistributionMetricSeriesVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + DistributionMetricSeriesVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsDistributionMetricSeriesVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? distributionMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsDistributionMetricSeriesVariant2 && distributionMetricSeriesVariant2 != null) + { + return distributionMetricSeriesVariant2(DistributionMetricSeriesVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? distributionMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsDistributionMetricSeriesVariant2) + { + distributionMetricSeriesVariant2?.Invoke(DistributionMetricSeriesVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? distributionMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsDistributionMetricSeriesVariant2) + { + distributionMetricSeriesVariant2?.Invoke(DistributionMetricSeriesVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricSeriesBase), + DistributionMetricSeriesVariant2, + typeof(global::Vectara.DistributionMetricSeriesVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(DistributionMetricSeries other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(DistributionMetricSeriesVariant2, other.DistributionMetricSeriesVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(DistributionMetricSeries obj1, DistributionMetricSeries obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(DistributionMetricSeries obj1, DistributionMetricSeries obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is DistributionMetricSeries o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.Json.g.cs new file mode 100644 index 00000000..d41d3bb1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class DistributionMetricSeriesVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.DistributionMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.DistributionMetricSeriesVariant2), + jsonSerializerContext) as global::Vectara.DistributionMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.DistributionMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.DistributionMetricSeriesVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.DistributionMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs new file mode 100644 index 00000000..9c102168 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.DistributionMetricSeriesVariant2.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class DistributionMetricSeriesVariant2 + { + /// + /// Default Value: distribution
+ /// Example: distribution + ///
+ /// "distribution" + /// distribution + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } = "distribution"; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("points")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Points { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: distribution
+ /// Example: distribution + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DistributionMetricSeriesVariant2( + string kind, + global::System.Collections.Generic.IList points) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Points = points ?? throw new global::System.ArgumentNullException(nameof(points)); + } + + /// + /// Initializes a new instance of the class. + /// + public DistributionMetricSeriesVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeries.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeries.Json.g.cs new file mode 100644 index 00000000..7705cc0a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeries.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct GaugeMetricSeries + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GaugeMetricSeries? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GaugeMetricSeries), + jsonSerializerContext) as global::Vectara.GaugeMetricSeries?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GaugeMetricSeries? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GaugeMetricSeries), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GaugeMetricSeries?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeries.g.cs new file mode 100644 index 00000000..d7262dc7 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeries.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A series of gauge values (point-in-time aggregates such as mean, max, distinct count). + /// + public readonly partial struct GaugeMetricSeries : global::System.IEquatable + { + /// + /// Common properties shared by all metric series kinds. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricSeriesBase? Base { get; init; } +#else + public global::Vectara.MetricSeriesBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricSeriesBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricSeriesBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.GaugeMetricSeriesVariant2? GaugeMetricSeriesVariant2 { get; init; } +#else + public global::Vectara.GaugeMetricSeriesVariant2? GaugeMetricSeriesVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GaugeMetricSeriesVariant2))] +#endif + public bool IsGaugeMetricSeriesVariant2 => GaugeMetricSeriesVariant2 != null; + + /// + /// + /// + public bool TryPickGaugeMetricSeriesVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GaugeMetricSeriesVariant2? value) + { + value = GaugeMetricSeriesVariant2; + return IsGaugeMetricSeriesVariant2; + } + + /// + /// + /// + public global::Vectara.GaugeMetricSeriesVariant2 PickGaugeMetricSeriesVariant2() => IsGaugeMetricSeriesVariant2 + ? GaugeMetricSeriesVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'GaugeMetricSeriesVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator GaugeMetricSeries(global::Vectara.MetricSeriesBase value) => new GaugeMetricSeries((global::Vectara.MetricSeriesBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricSeriesBase?(GaugeMetricSeries @this) => @this.Base; + + /// + /// + /// + public GaugeMetricSeries(global::Vectara.MetricSeriesBase? value) + { + Base = value; + } + + /// + /// + /// + public static GaugeMetricSeries FromBase(global::Vectara.MetricSeriesBase? value) => new GaugeMetricSeries(value); + + /// + /// + /// + public static implicit operator GaugeMetricSeries(global::Vectara.GaugeMetricSeriesVariant2 value) => new GaugeMetricSeries((global::Vectara.GaugeMetricSeriesVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GaugeMetricSeriesVariant2?(GaugeMetricSeries @this) => @this.GaugeMetricSeriesVariant2; + + /// + /// + /// + public GaugeMetricSeries(global::Vectara.GaugeMetricSeriesVariant2? value) + { + GaugeMetricSeriesVariant2 = value; + } + + /// + /// + /// + public static GaugeMetricSeries FromGaugeMetricSeriesVariant2(global::Vectara.GaugeMetricSeriesVariant2? value) => new GaugeMetricSeries(value); + + /// + /// + /// + public GaugeMetricSeries( + global::Vectara.MetricSeriesBase? @base, + global::Vectara.GaugeMetricSeriesVariant2? gaugeMetricSeriesVariant2 + ) + { + Base = @base; + GaugeMetricSeriesVariant2 = gaugeMetricSeriesVariant2; + } + + /// + /// + /// + public object? Object => + GaugeMetricSeriesVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + GaugeMetricSeriesVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsGaugeMetricSeriesVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? gaugeMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsGaugeMetricSeriesVariant2 && gaugeMetricSeriesVariant2 != null) + { + return gaugeMetricSeriesVariant2(GaugeMetricSeriesVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? gaugeMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGaugeMetricSeriesVariant2) + { + gaugeMetricSeriesVariant2?.Invoke(GaugeMetricSeriesVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? gaugeMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsGaugeMetricSeriesVariant2) + { + gaugeMetricSeriesVariant2?.Invoke(GaugeMetricSeriesVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricSeriesBase), + GaugeMetricSeriesVariant2, + typeof(global::Vectara.GaugeMetricSeriesVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GaugeMetricSeries other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GaugeMetricSeriesVariant2, other.GaugeMetricSeriesVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(GaugeMetricSeries obj1, GaugeMetricSeries obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GaugeMetricSeries obj1, GaugeMetricSeries obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GaugeMetricSeries o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.Json.g.cs new file mode 100644 index 00000000..46b5d232 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class GaugeMetricSeriesVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GaugeMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GaugeMetricSeriesVariant2), + jsonSerializerContext) as global::Vectara.GaugeMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GaugeMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GaugeMetricSeriesVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GaugeMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs new file mode 100644 index 00000000..59891d87 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GaugeMetricSeriesVariant2.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class GaugeMetricSeriesVariant2 + { + /// + /// Default Value: gauge
+ /// Example: gauge + ///
+ /// "gauge" + /// gauge + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } = "gauge"; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("points")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Points { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: gauge
+ /// Example: gauge + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GaugeMetricSeriesVariant2( + string kind, + global::System.Collections.Generic.IList points) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Points = points ?? throw new global::System.ArgumentNullException(nameof(points)); + } + + /// + /// Initializes a new instance of the class. + /// + public GaugeMetricSeriesVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.GetMetricLabels.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GetMetricLabels.Json.g.cs new file mode 100644 index 00000000..bb0ccaf2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.GetMetricLabels.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class GetMetricLabels + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.GetMetricLabels? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.GetMetricLabels), + jsonSerializerContext) as global::Vectara.GetMetricLabels; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.GetMetricLabels? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.GetMetricLabels), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.GetMetricLabels; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParametersHeaders.g.cs b/src/libs/Vectara/Generated/Vectara.Models.GetMetricLabels.g.cs similarity index 88% rename from src/libs/Vectara/Generated/Vectara.Models.WebGetToolParametersHeaders.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.GetMetricLabels.g.cs index baa03ff8..3b4befe7 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParametersHeaders.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.GetMetricLabels.g.cs @@ -6,7 +6,7 @@ namespace Vectara /// /// /// - public sealed partial class WebGetToolParametersHeaders + public sealed partial class GetMetricLabels { /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.Json.g.cs new file mode 100644 index 00000000..1275a11b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class HistogramBin + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.HistogramBin? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.HistogramBin), + jsonSerializerContext) as global::Vectara.HistogramBin; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.HistogramBin? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.HistogramBin), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.HistogramBin; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs b/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs new file mode 100644 index 00000000..7f5bb6e8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.HistogramBin.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A single bin in a distribution histogram. `upper_ms` is null for the overflow bin (everything ≥ the lower bound). + /// + public sealed partial class HistogramBin + { + /// + /// Inclusive lower bound of the bin in milliseconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("lower_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double LowerMs { get; set; } + + /// + /// Exclusive upper bound of the bin in milliseconds. Null for the overflow bin. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("upper_ms")] + public double? UpperMs { get; set; } + + /// + /// Number of observations whose duration fell in `[lower_ms, upper_ms)`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("count")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long Count { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Inclusive lower bound of the bin in milliseconds. + /// + /// + /// Number of observations whose duration fell in `[lower_ms, upper_ms)`. + /// + /// + /// Exclusive upper bound of the bin in milliseconds. Null for the overflow bin. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HistogramBin( + double lowerMs, + long count, + double? upperMs) + { + this.LowerMs = lowerMs; + this.UpperMs = upperMs; + this.Count = count; + } + + /// + /// Initializes a new instance of the class. + /// + public HistogramBin() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentSpanAttributes.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentSpanAttributes.g.cs index 2b8319b5..5de01e7a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentSpanAttributes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InvokeAgentSpanAttributes.g.cs @@ -87,6 +87,24 @@ public sealed partial class InvokeAgentSpanAttributes [global::System.Text.Json.Serialization.JsonPropertyName("input_files")] public global::System.Collections.Generic.IList? InputFiles { get; set; } + /// + /// For sub-agent invocations, the agent_id of the agent that invoked this one. Null for entry-point agents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parent_agent_id")] + public string? ParentAgentId { get; set; } + + /// + /// For sub-agent invocations, the session_key of the parent agent session. Null for entry-point agents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parent_session_id")] + public string? ParentSessionId { get; set; } + + /// + /// Nesting depth of this agent invocation. 0 for entry-point agents, 1 for first-level sub-agents, and so on. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("depth")] + public int? Depth { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -135,6 +153,15 @@ public sealed partial class InvokeAgentSpanAttributes /// /// Metadata for files uploaded with the input, if any. /// + /// + /// For sub-agent invocations, the agent_id of the agent that invoked this one. Null for entry-point agents. + /// + /// + /// For sub-agent invocations, the session_key of the parent agent session. Null for entry-point agents. + /// + /// + /// Nesting depth of this agent invocation. 0 for entry-point agents, 1 for first-level sub-agents, and so on. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -151,7 +178,10 @@ public InvokeAgentSpanAttributes( global::Vectara.InvokeAgentSpanAttributesOutputType? outputType, string? inputEventId, string? outputEventId, - global::System.Collections.Generic.IList? inputFiles) + global::System.Collections.Generic.IList? inputFiles, + string? parentAgentId, + string? parentSessionId, + int? depth) { this.Model = model; this.InputTokens = inputTokens; @@ -166,6 +196,9 @@ public InvokeAgentSpanAttributes( this.InputEventId = inputEventId; this.OutputEventId = outputEventId; this.InputFiles = inputFiles; + this.ParentAgentId = parentAgentId; + this.ParentSessionId = parentSessionId; + this.Depth = depth; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ListMetricsResponse.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListMetricsResponse.Json.g.cs new file mode 100644 index 00000000..667e7584 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ListMetricsResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class ListMetricsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.ListMetricsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ListMetricsResponse), + jsonSerializerContext) as global::Vectara.ListMetricsResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.ListMetricsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.ListMetricsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ListMetricsResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.ListMetricsResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ListMetricsResponse.g.cs new file mode 100644 index 00000000..f3a2606b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ListMetricsResponse.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// List of registered metrics available for querying. + /// + public sealed partial class ListMetricsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Metrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListMetricsResponse( + global::System.Collections.Generic.IList metrics) + { + this.Metrics = metrics ?? throw new global::System.ArgumentNullException(nameof(metrics)); + } + + /// + /// Initializes a new instance of the class. + /// + public ListMetricsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs new file mode 100644 index 00000000..75d038f0 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MetricDescriptor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricDescriptor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricDescriptor), + jsonSerializerContext) as global::Vectara.MetricDescriptor; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricDescriptor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricDescriptor), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricDescriptor; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs new file mode 100644 index 00000000..a8621146 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricDescriptor.g.cs @@ -0,0 +1,112 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Metadata about a registered metric available for querying. + /// + public sealed partial class MetricDescriptor + { + /// + /// The unique name of the metric, used as the path parameter to query it.
+ /// Example: agent.trace.duration_ms + ///
+ /// agent.trace.duration_ms + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Human-readable description of what the metric measures. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// Unit of measure for the metric values, when applicable.
+ /// Example: ms + ///
+ /// ms + [global::System.Text.Json.Serialization.JsonPropertyName("unit")] + public string? Unit { get; set; } + + /// + /// The kind of metric. Determines combine semantics when filtering across multiple label values and the shape of points in the response:
+ /// - `counter`: monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s.
+ /// - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s.
+ /// - `percentiles`: distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s.
+ /// - `distribution`: histogram of value-bucketed counts. Combined by summing per-bin counts. Returns `DistributionMetricPoint`s. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.MetricKindJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.MetricKind Kind { get; set; } + + /// + /// Names of labels that can be used to filter this metric.
+ /// Example: [agent_keys] + ///
+ /// [agent_keys] + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique name of the metric, used as the path parameter to query it.
+ /// Example: agent.trace.duration_ms + /// + /// + /// Human-readable description of what the metric measures. + /// + /// + /// The kind of metric. Determines combine semantics when filtering across multiple label values and the shape of points in the response:
+ /// - `counter`: monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s.
+ /// - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s.
+ /// - `percentiles`: distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s.
+ /// - `distribution`: histogram of value-bucketed counts. Combined by summing per-bin counts. Returns `DistributionMetricPoint`s. + /// + /// + /// Names of labels that can be used to filter this metric.
+ /// Example: [agent_keys] + /// + /// + /// Unit of measure for the metric values, when applicable.
+ /// Example: ms + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MetricDescriptor( + string name, + string description, + global::Vectara.MetricKind kind, + global::System.Collections.Generic.IList labels, + string? unit) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Unit = unit; + this.Kind = kind; + this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); + } + + /// + /// Initializes a new instance of the class. + /// + public MetricDescriptor() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs new file mode 100644 index 00000000..398b9187 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricKind.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// The kind of metric. Determines combine semantics when filtering across multiple label values and the shape of points in the response:
+ /// - `counter`: monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s.
+ /// - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s.
+ /// - `percentiles`: distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s.
+ /// - `distribution`: histogram of value-bucketed counts. Combined by summing per-bin counts. Returns `DistributionMetricPoint`s. + ///
+ public enum MetricKind + { + /// + /// monotonic count or sum (trace count, error count, token totals). Combined by summing. Returns `ScalarMetricPoint`s. + /// + Counter, + /// + /// distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s. + /// + Distribution, + /// + /// point-in-time value (mean, max, distinct-count). Combined per the underlying aggregate state (weighted mean for averages, max for maxima, distinct-count for uniq metrics). Returns `ScalarMetricPoint`s. + /// + Gauge, + /// + /// distribution percentiles over a t-digest aggregate. Combined by merging t-digest states. Returns `PercentilesMetricPoint`s. + /// + Percentiles, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MetricKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MetricKind value) + { + return value switch + { + MetricKind.Counter => "counter", + MetricKind.Distribution => "distribution", + MetricKind.Gauge => "gauge", + MetricKind.Percentiles => "percentiles", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MetricKind? ToEnum(string value) + { + return value switch + { + "counter" => MetricKind.Counter, + "distribution" => MetricKind.Distribution, + "gauge" => MetricKind.Gauge, + "percentiles" => MetricKind.Percentiles, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.Json.g.cs new file mode 100644 index 00000000..cd041be2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct MetricSeries + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricSeries? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricSeries), + jsonSerializerContext) as global::Vectara.MetricSeries?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricSeries? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricSeries), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricSeries?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs new file mode 100644 index 00000000..262ddc13 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeries.g.cs @@ -0,0 +1,469 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A time series of metric points. The shape of points varies by metric kind. + /// + public readonly partial struct MetricSeries : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.MetricSeriesDiscriminatorKind? Kind { get; } + + /// + /// A series of counter values (monotonic count or sum). + /// +#if NET6_0_OR_GREATER + public global::Vectara.CounterMetricSeries? Counter { get; init; } +#else + public global::Vectara.CounterMetricSeries? Counter { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Counter))] +#endif + public bool IsCounter => Counter != null; + + /// + /// + /// + public bool TryPickCounter( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.CounterMetricSeries? value) + { + value = Counter; + return IsCounter; + } + + /// + /// + /// + public global::Vectara.CounterMetricSeries PickCounter() => IsCounter + ? Counter!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Counter' but the value was {ToString()}."); + + /// + /// A series of gauge values (point-in-time aggregates such as mean, max, distinct count). + /// +#if NET6_0_OR_GREATER + public global::Vectara.GaugeMetricSeries? Gauge { get; init; } +#else + public global::Vectara.GaugeMetricSeries? Gauge { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Gauge))] +#endif + public bool IsGauge => Gauge != null; + + /// + /// + /// + public bool TryPickGauge( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.GaugeMetricSeries? value) + { + value = Gauge; + return IsGauge; + } + + /// + /// + /// + public global::Vectara.GaugeMetricSeries PickGauge() => IsGauge + ? Gauge!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Gauge' but the value was {ToString()}."); + + /// + /// A series of percentile aggregates over a t-digest state. + /// +#if NET6_0_OR_GREATER + public global::Vectara.PercentilesMetricSeries? Percentiles { get; init; } +#else + public global::Vectara.PercentilesMetricSeries? Percentiles { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Percentiles))] +#endif + public bool IsPercentiles => Percentiles != null; + + /// + /// + /// + public bool TryPickPercentiles( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.PercentilesMetricSeries? value) + { + value = Percentiles; + return IsPercentiles; + } + + /// + /// + /// + public global::Vectara.PercentilesMetricSeries PickPercentiles() => IsPercentiles + ? Percentiles!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Percentiles' but the value was {ToString()}."); + + /// + /// A series of histogram aggregates over a value-axis distribution table. + /// +#if NET6_0_OR_GREATER + public global::Vectara.DistributionMetricSeries? Distribution { get; init; } +#else + public global::Vectara.DistributionMetricSeries? Distribution { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Distribution))] +#endif + public bool IsDistribution => Distribution != null; + + /// + /// + /// + public bool TryPickDistribution( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.DistributionMetricSeries? value) + { + value = Distribution; + return IsDistribution; + } + + /// + /// + /// + public global::Vectara.DistributionMetricSeries PickDistribution() => IsDistribution + ? Distribution!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'Distribution' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator MetricSeries(global::Vectara.CounterMetricSeries value) => new MetricSeries((global::Vectara.CounterMetricSeries?)value); + + /// + /// + /// + public static implicit operator global::Vectara.CounterMetricSeries?(MetricSeries @this) => @this.Counter; + + /// + /// + /// + public MetricSeries(global::Vectara.CounterMetricSeries? value) + { + Counter = value; + } + + /// + /// + /// + public static MetricSeries FromCounter(global::Vectara.CounterMetricSeries? value) => new MetricSeries(value); + + /// + /// + /// + public static implicit operator MetricSeries(global::Vectara.GaugeMetricSeries value) => new MetricSeries((global::Vectara.GaugeMetricSeries?)value); + + /// + /// + /// + public static implicit operator global::Vectara.GaugeMetricSeries?(MetricSeries @this) => @this.Gauge; + + /// + /// + /// + public MetricSeries(global::Vectara.GaugeMetricSeries? value) + { + Gauge = value; + } + + /// + /// + /// + public static MetricSeries FromGauge(global::Vectara.GaugeMetricSeries? value) => new MetricSeries(value); + + /// + /// + /// + public static implicit operator MetricSeries(global::Vectara.PercentilesMetricSeries value) => new MetricSeries((global::Vectara.PercentilesMetricSeries?)value); + + /// + /// + /// + public static implicit operator global::Vectara.PercentilesMetricSeries?(MetricSeries @this) => @this.Percentiles; + + /// + /// + /// + public MetricSeries(global::Vectara.PercentilesMetricSeries? value) + { + Percentiles = value; + } + + /// + /// + /// + public static MetricSeries FromPercentiles(global::Vectara.PercentilesMetricSeries? value) => new MetricSeries(value); + + /// + /// + /// + public static implicit operator MetricSeries(global::Vectara.DistributionMetricSeries value) => new MetricSeries((global::Vectara.DistributionMetricSeries?)value); + + /// + /// + /// + public static implicit operator global::Vectara.DistributionMetricSeries?(MetricSeries @this) => @this.Distribution; + + /// + /// + /// + public MetricSeries(global::Vectara.DistributionMetricSeries? value) + { + Distribution = value; + } + + /// + /// + /// + public static MetricSeries FromDistribution(global::Vectara.DistributionMetricSeries? value) => new MetricSeries(value); + + /// + /// + /// + public MetricSeries( + global::Vectara.MetricSeriesDiscriminatorKind? kind, + global::Vectara.CounterMetricSeries? counter, + global::Vectara.GaugeMetricSeries? gauge, + global::Vectara.PercentilesMetricSeries? percentiles, + global::Vectara.DistributionMetricSeries? distribution + ) + { + Kind = kind; + + Counter = counter; + Gauge = gauge; + Percentiles = percentiles; + Distribution = distribution; + } + + /// + /// + /// + public object? Object => + Distribution as object ?? + Percentiles as object ?? + Gauge as object ?? + Counter as object + ; + + /// + /// + /// + public override string? ToString() => + Counter?.ToString() ?? + Gauge?.ToString() ?? + Percentiles?.ToString() ?? + Distribution?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsCounter && !IsGauge && !IsPercentiles && !IsDistribution || !IsCounter && IsGauge && !IsPercentiles && !IsDistribution || !IsCounter && !IsGauge && IsPercentiles && !IsDistribution || !IsCounter && !IsGauge && !IsPercentiles && IsDistribution; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? counter = null, + global::System.Func? gauge = null, + global::System.Func? percentiles = null, + global::System.Func? distribution = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCounter && counter != null) + { + return counter(Counter!); + } + else if (IsGauge && gauge != null) + { + return gauge(Gauge!); + } + else if (IsPercentiles && percentiles != null) + { + return percentiles(Percentiles!); + } + else if (IsDistribution && distribution != null) + { + return distribution(Distribution!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? counter = null, + + global::System.Action? gauge = null, + + global::System.Action? percentiles = null, + + global::System.Action? distribution = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCounter) + { + counter?.Invoke(Counter!); + } + else if (IsGauge) + { + gauge?.Invoke(Gauge!); + } + else if (IsPercentiles) + { + percentiles?.Invoke(Percentiles!); + } + else if (IsDistribution) + { + distribution?.Invoke(Distribution!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? counter = null, + global::System.Action? gauge = null, + global::System.Action? percentiles = null, + global::System.Action? distribution = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsCounter) + { + counter?.Invoke(Counter!); + } + else if (IsGauge) + { + gauge?.Invoke(Gauge!); + } + else if (IsPercentiles) + { + percentiles?.Invoke(Percentiles!); + } + else if (IsDistribution) + { + distribution?.Invoke(Distribution!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Counter, + typeof(global::Vectara.CounterMetricSeries), + Gauge, + typeof(global::Vectara.GaugeMetricSeries), + Percentiles, + typeof(global::Vectara.PercentilesMetricSeries), + Distribution, + typeof(global::Vectara.DistributionMetricSeries), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(MetricSeries other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Counter, other.Counter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Gauge, other.Gauge) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Percentiles, other.Percentiles) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Distribution, other.Distribution) + ; + } + + /// + /// + /// + public static bool operator ==(MetricSeries obj1, MetricSeries obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(MetricSeries obj1, MetricSeries obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is MetricSeries o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.Json.g.cs new file mode 100644 index 00000000..031c8cd7 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MetricSeriesBase + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricSeriesBase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricSeriesBase), + jsonSerializerContext) as global::Vectara.MetricSeriesBase; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricSeriesBase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricSeriesBase), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricSeriesBase; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs new file mode 100644 index 00000000..550b10cb --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBase.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Common properties shared by all metric series kinds. + /// + public sealed partial class MetricSeriesBase + { + /// + /// The name of the metric this series describes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metric_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string MetricName { get; set; } + + /// + /// The labels matched for this series. Echoes the filter values supplied in the request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary> Labels { get; set; } + + /// + /// Width of each bucket in the returned series, in seconds. The server chooses this based on the requested time range and `max_buckets`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bucket_size_seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int BucketSizeSeconds { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the metric this series describes. + /// + /// + /// The labels matched for this series. Echoes the filter values supplied in the request. + /// + /// + /// Width of each bucket in the returned series, in seconds. The server chooses this based on the requested time range and `max_buckets`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MetricSeriesBase( + string metricName, + global::System.Collections.Generic.Dictionary> labels, + int bucketSizeSeconds) + { + this.MetricName = metricName ?? throw new global::System.ArgumentNullException(nameof(metricName)); + this.Labels = labels ?? throw new global::System.ArgumentNullException(nameof(labels)); + this.BucketSizeSeconds = bucketSizeSeconds; + } + + /// + /// Initializes a new instance of the class. + /// + public MetricSeriesBase() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBaseLabels.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBaseLabels.Json.g.cs new file mode 100644 index 00000000..26b81772 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBaseLabels.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MetricSeriesBaseLabels + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricSeriesBaseLabels? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricSeriesBaseLabels), + jsonSerializerContext) as global::Vectara.MetricSeriesBaseLabels; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricSeriesBaseLabels? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricSeriesBaseLabels), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricSeriesBaseLabels; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBaseLabels.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBaseLabels.g.cs new file mode 100644 index 00000000..d887b39e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesBaseLabels.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// The labels matched for this series. Echoes the filter values supplied in the request. + /// + public sealed partial class MetricSeriesBaseLabels + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminator.Json.g.cs new file mode 100644 index 00000000..3057981d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class MetricSeriesDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.MetricSeriesDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.MetricSeriesDiscriminator), + jsonSerializerContext) as global::Vectara.MetricSeriesDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.MetricSeriesDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.MetricSeriesDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.MetricSeriesDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminator.g.cs new file mode 100644 index 00000000..894934f2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class MetricSeriesDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.MetricSeriesDiscriminatorKindJsonConverter))] + public global::Vectara.MetricSeriesDiscriminatorKind? Kind { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MetricSeriesDiscriminator( + global::Vectara.MetricSeriesDiscriminatorKind? kind) + { + this.Kind = kind; + } + + /// + /// Initializes a new instance of the class. + /// + public MetricSeriesDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminatorKind.g.cs b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminatorKind.g.cs new file mode 100644 index 00000000..a4c8d8a1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.MetricSeriesDiscriminatorKind.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum MetricSeriesDiscriminatorKind + { + /// + /// + /// + Counter, + /// + /// + /// + Distribution, + /// + /// + /// + Gauge, + /// + /// + /// + Percentiles, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MetricSeriesDiscriminatorKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MetricSeriesDiscriminatorKind value) + { + return value switch + { + MetricSeriesDiscriminatorKind.Counter => "counter", + MetricSeriesDiscriminatorKind.Distribution => "distribution", + MetricSeriesDiscriminatorKind.Gauge => "gauge", + MetricSeriesDiscriminatorKind.Percentiles => "percentiles", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MetricSeriesDiscriminatorKind? ToEnum(string value) + { + return value switch + { + "counter" => MetricSeriesDiscriminatorKind.Counter, + "distribution" => MetricSeriesDiscriminatorKind.Distribution, + "gauge" => MetricSeriesDiscriminatorKind.Gauge, + "percentiles" => MetricSeriesDiscriminatorKind.Percentiles, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.Json.g.cs new file mode 100644 index 00000000..72bdf776 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class PercentilesMetricPoint + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.PercentilesMetricPoint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.PercentilesMetricPoint), + jsonSerializerContext) as global::Vectara.PercentilesMetricPoint; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.PercentilesMetricPoint? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.PercentilesMetricPoint), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricPoint; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs new file mode 100644 index 00000000..2618c9e7 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPoint.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A point in a percentiles metric series. + /// + public sealed partial class PercentilesMetricPoint + { + /// + /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bucket_start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime BucketStart { get; set; } + + /// + /// Map of percentile label to value. Keys follow the `p<N>` convention (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("percentiles")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary Percentiles { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + /// + /// Map of percentile label to value. Keys follow the `p<N>` convention (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PercentilesMetricPoint( + global::System.DateTime bucketStart, + global::System.Collections.Generic.Dictionary percentiles) + { + this.BucketStart = bucketStart; + this.Percentiles = percentiles ?? throw new global::System.ArgumentNullException(nameof(percentiles)); + } + + /// + /// Initializes a new instance of the class. + /// + public PercentilesMetricPoint() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs new file mode 100644 index 00000000..10c9e990 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class PercentilesMetricPointPercentiles + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.PercentilesMetricPointPercentiles? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.PercentilesMetricPointPercentiles), + jsonSerializerContext) as global::Vectara.PercentilesMetricPointPercentiles; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.PercentilesMetricPointPercentiles? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.PercentilesMetricPointPercentiles), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricPointPercentiles; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs new file mode 100644 index 00000000..17c27158 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricPointPercentiles.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Map of percentile label to value. Keys follow the `p<N>` convention (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). + /// + public sealed partial class PercentilesMetricPointPercentiles + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeries.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeries.Json.g.cs new file mode 100644 index 00000000..5fd140af --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeries.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct PercentilesMetricSeries + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.PercentilesMetricSeries? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.PercentilesMetricSeries), + jsonSerializerContext) as global::Vectara.PercentilesMetricSeries?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.PercentilesMetricSeries? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.PercentilesMetricSeries), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricSeries?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeries.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeries.g.cs new file mode 100644 index 00000000..a56e7f41 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeries.g.cs @@ -0,0 +1,295 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// A series of percentile aggregates over a t-digest state. + /// + public readonly partial struct PercentilesMetricSeries : global::System.IEquatable + { + /// + /// Common properties shared by all metric series kinds. + /// +#if NET6_0_OR_GREATER + public global::Vectara.MetricSeriesBase? Base { get; init; } +#else + public global::Vectara.MetricSeriesBase? Base { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; + + /// + /// + /// + public bool TryPickBase( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.MetricSeriesBase? value) + { + value = Base; + return IsBase; + } + + /// + /// + /// + public global::Vectara.MetricSeriesBase PickBase() => IsBase + ? Base! + : throw new global::System.InvalidOperationException($"Expected union variant 'Base' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.PercentilesMetricSeriesVariant2? PercentilesMetricSeriesVariant2 { get; init; } +#else + public global::Vectara.PercentilesMetricSeriesVariant2? PercentilesMetricSeriesVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PercentilesMetricSeriesVariant2))] +#endif + public bool IsPercentilesMetricSeriesVariant2 => PercentilesMetricSeriesVariant2 != null; + + /// + /// + /// + public bool TryPickPercentilesMetricSeriesVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.PercentilesMetricSeriesVariant2? value) + { + value = PercentilesMetricSeriesVariant2; + return IsPercentilesMetricSeriesVariant2; + } + + /// + /// + /// + public global::Vectara.PercentilesMetricSeriesVariant2 PickPercentilesMetricSeriesVariant2() => IsPercentilesMetricSeriesVariant2 + ? PercentilesMetricSeriesVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'PercentilesMetricSeriesVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator PercentilesMetricSeries(global::Vectara.MetricSeriesBase value) => new PercentilesMetricSeries((global::Vectara.MetricSeriesBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.MetricSeriesBase?(PercentilesMetricSeries @this) => @this.Base; + + /// + /// + /// + public PercentilesMetricSeries(global::Vectara.MetricSeriesBase? value) + { + Base = value; + } + + /// + /// + /// + public static PercentilesMetricSeries FromBase(global::Vectara.MetricSeriesBase? value) => new PercentilesMetricSeries(value); + + /// + /// + /// + public static implicit operator PercentilesMetricSeries(global::Vectara.PercentilesMetricSeriesVariant2 value) => new PercentilesMetricSeries((global::Vectara.PercentilesMetricSeriesVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.PercentilesMetricSeriesVariant2?(PercentilesMetricSeries @this) => @this.PercentilesMetricSeriesVariant2; + + /// + /// + /// + public PercentilesMetricSeries(global::Vectara.PercentilesMetricSeriesVariant2? value) + { + PercentilesMetricSeriesVariant2 = value; + } + + /// + /// + /// + public static PercentilesMetricSeries FromPercentilesMetricSeriesVariant2(global::Vectara.PercentilesMetricSeriesVariant2? value) => new PercentilesMetricSeries(value); + + /// + /// + /// + public PercentilesMetricSeries( + global::Vectara.MetricSeriesBase? @base, + global::Vectara.PercentilesMetricSeriesVariant2? percentilesMetricSeriesVariant2 + ) + { + Base = @base; + PercentilesMetricSeriesVariant2 = percentilesMetricSeriesVariant2; + } + + /// + /// + /// + public object? Object => + PercentilesMetricSeriesVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + PercentilesMetricSeriesVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsPercentilesMetricSeriesVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? percentilesMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsPercentilesMetricSeriesVariant2 && percentilesMetricSeriesVariant2 != null) + { + return percentilesMetricSeriesVariant2(PercentilesMetricSeriesVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + + global::System.Action? percentilesMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsPercentilesMetricSeriesVariant2) + { + percentilesMetricSeriesVariant2?.Invoke(PercentilesMetricSeriesVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? @base = null, + global::System.Action? percentilesMetricSeriesVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsPercentilesMetricSeriesVariant2) + { + percentilesMetricSeriesVariant2?.Invoke(PercentilesMetricSeriesVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.MetricSeriesBase), + PercentilesMetricSeriesVariant2, + typeof(global::Vectara.PercentilesMetricSeriesVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(PercentilesMetricSeries other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PercentilesMetricSeriesVariant2, other.PercentilesMetricSeriesVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(PercentilesMetricSeries obj1, PercentilesMetricSeries obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(PercentilesMetricSeries obj1, PercentilesMetricSeries obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is PercentilesMetricSeries o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.Json.g.cs new file mode 100644 index 00000000..4b35196d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class PercentilesMetricSeriesVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.PercentilesMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.PercentilesMetricSeriesVariant2), + jsonSerializerContext) as global::Vectara.PercentilesMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.PercentilesMetricSeriesVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.PercentilesMetricSeriesVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.PercentilesMetricSeriesVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs new file mode 100644 index 00000000..0d3f6931 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.PercentilesMetricSeriesVariant2.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class PercentilesMetricSeriesVariant2 + { + /// + /// Default Value: percentiles
+ /// Example: percentiles + ///
+ /// "percentiles" + /// percentiles + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Kind { get; set; } = "percentiles"; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("points")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Points { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: percentiles
+ /// Example: percentiles + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PercentilesMetricSeriesVariant2( + string kind, + global::System.Collections.Generic.IList points) + { + this.Kind = kind ?? throw new global::System.ArgumentNullException(nameof(kind)); + this.Points = points ?? throw new global::System.ArgumentNullException(nameof(points)); + } + + /// + /// Initializes a new instance of the class. + /// + public PercentilesMetricSeriesVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.Json.g.cs new file mode 100644 index 00000000..5a1a38e3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class ScalarMetricPoint + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.ScalarMetricPoint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.ScalarMetricPoint), + jsonSerializerContext) as global::Vectara.ScalarMetricPoint; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.ScalarMetricPoint? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.ScalarMetricPoint), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.ScalarMetricPoint; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs new file mode 100644 index 00000000..82f8be6f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ScalarMetricPoint.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A point in a counter or gauge metric series — a single scalar value at a time bucket. + /// + public sealed partial class ScalarMetricPoint + { + /// + /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bucket_start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime BucketStart { get; set; } + + /// + /// The aggregated value for this bucket. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Value { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Start of the bucket window in ISO 8601 (UTC). End-time aligned. + /// + /// + /// The aggregated value for this bucket. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ScalarMetricPoint( + global::System.DateTime bucketStart, + double value) + { + this.BucketStart = bucketStart; + this.Value = value; + } + + /// + /// Initializes a new instance of the class. + /// + public ScalarMetricPoint() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.Json.g.cs new file mode 100644 index 00000000..d2ba68e9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct WebGetAuth + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetAuth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetAuth), + jsonSerializerContext) as global::Vectara.WebGetAuth?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetAuth? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetAuth?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs new file mode 100644 index 00000000..b441fd1a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuth.g.cs @@ -0,0 +1,556 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// Authentication configuration for the outgoing HTTP request. + /// + public readonly partial struct WebGetAuth : global::System.IEquatable + { + /// + /// + /// + public global::Vectara.WebGetAuthDiscriminatorType? Type { get; } + + /// + /// Explicitly disables authentication. Useful in argument_override to force a tool config to
+ /// clear any auth the LLM would otherwise supply, since merge semantics ignore null patches. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.WebGetNoAuth? None { get; init; } +#else + public global::Vectara.WebGetNoAuth? None { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(None))] +#endif + public bool IsNone => None != null; + + /// + /// + /// + public bool TryPickNone( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetNoAuth? value) + { + value = None; + return IsNone; + } + + /// + /// + /// + public global::Vectara.WebGetNoAuth PickNone() => IsNone + ? None! + : throw new global::System.InvalidOperationException($"Expected union variant 'None' but the value was {ToString()}."); + + /// + /// Static bearer token authentication. Adds `Authorization: Bearer <token>`. + /// +#if NET6_0_OR_GREATER + public global::Vectara.WebGetBearerAuth? Bearer { get; init; } +#else + public global::Vectara.WebGetBearerAuth? Bearer { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Bearer))] +#endif + public bool IsBearer => Bearer != null; + + /// + /// + /// + public bool TryPickBearer( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetBearerAuth? value) + { + value = Bearer; + return IsBearer; + } + + /// + /// + /// + public global::Vectara.WebGetBearerAuth PickBearer() => IsBearer + ? Bearer! + : throw new global::System.InvalidOperationException($"Expected union variant 'Bearer' but the value was {ToString()}."); + + /// + /// Static custom-header authentication, suitable for API keys. + /// +#if NET6_0_OR_GREATER + public global::Vectara.WebGetHeaderAuth? Header { get; init; } +#else + public global::Vectara.WebGetHeaderAuth? Header { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Header))] +#endif + public bool IsHeader => Header != null; + + /// + /// + /// + public bool TryPickHeader( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetHeaderAuth? value) + { + value = Header; + return IsHeader; + } + + /// + /// + /// + public global::Vectara.WebGetHeaderAuth PickHeader() => IsHeader + ? Header! + : throw new global::System.InvalidOperationException($"Expected union variant 'Header' but the value was {ToString()}."); + + /// + /// OAuth 2.0 client-credentials grant. The platform fetches an access token from the token
+ /// endpoint and caches it until it expires. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.WebGetOAuthClientCredentialsAuth? OauthClientCredentials { get; init; } +#else + public global::Vectara.WebGetOAuthClientCredentialsAuth? OauthClientCredentials { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OauthClientCredentials))] +#endif + public bool IsOauthClientCredentials => OauthClientCredentials != null; + + /// + /// + /// + public bool TryPickOauthClientCredentials( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetOAuthClientCredentialsAuth? value) + { + value = OauthClientCredentials; + return IsOauthClientCredentials; + } + + /// + /// + /// + public global::Vectara.WebGetOAuthClientCredentialsAuth PickOauthClientCredentials() => IsOauthClientCredentials + ? OauthClientCredentials! + : throw new global::System.InvalidOperationException($"Expected union variant 'OauthClientCredentials' but the value was {ToString()}."); + + /// + /// OAuth 2.0 refresh-token grant. The platform exchanges a long-lived refresh token for an
+ /// access token and caches the result until it expires. Supports refresh-token rotation: if
+ /// the IdP returns a new refresh_token, subsequent refreshes use it automatically. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.WebGetOAuthRefreshTokenAuth? OauthRefreshToken { get; init; } +#else + public global::Vectara.WebGetOAuthRefreshTokenAuth? OauthRefreshToken { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OauthRefreshToken))] +#endif + public bool IsOauthRefreshToken => OauthRefreshToken != null; + + /// + /// + /// + public bool TryPickOauthRefreshToken( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.WebGetOAuthRefreshTokenAuth? value) + { + value = OauthRefreshToken; + return IsOauthRefreshToken; + } + + /// + /// + /// + public global::Vectara.WebGetOAuthRefreshTokenAuth PickOauthRefreshToken() => IsOauthRefreshToken + ? OauthRefreshToken! + : throw new global::System.InvalidOperationException($"Expected union variant 'OauthRefreshToken' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator WebGetAuth(global::Vectara.WebGetNoAuth value) => new WebGetAuth((global::Vectara.WebGetNoAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.WebGetNoAuth?(WebGetAuth @this) => @this.None; + + /// + /// + /// + public WebGetAuth(global::Vectara.WebGetNoAuth? value) + { + None = value; + } + + /// + /// + /// + public static WebGetAuth FromNone(global::Vectara.WebGetNoAuth? value) => new WebGetAuth(value); + + /// + /// + /// + public static implicit operator WebGetAuth(global::Vectara.WebGetBearerAuth value) => new WebGetAuth((global::Vectara.WebGetBearerAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.WebGetBearerAuth?(WebGetAuth @this) => @this.Bearer; + + /// + /// + /// + public WebGetAuth(global::Vectara.WebGetBearerAuth? value) + { + Bearer = value; + } + + /// + /// + /// + public static WebGetAuth FromBearer(global::Vectara.WebGetBearerAuth? value) => new WebGetAuth(value); + + /// + /// + /// + public static implicit operator WebGetAuth(global::Vectara.WebGetHeaderAuth value) => new WebGetAuth((global::Vectara.WebGetHeaderAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.WebGetHeaderAuth?(WebGetAuth @this) => @this.Header; + + /// + /// + /// + public WebGetAuth(global::Vectara.WebGetHeaderAuth? value) + { + Header = value; + } + + /// + /// + /// + public static WebGetAuth FromHeader(global::Vectara.WebGetHeaderAuth? value) => new WebGetAuth(value); + + /// + /// + /// + public static implicit operator WebGetAuth(global::Vectara.WebGetOAuthClientCredentialsAuth value) => new WebGetAuth((global::Vectara.WebGetOAuthClientCredentialsAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.WebGetOAuthClientCredentialsAuth?(WebGetAuth @this) => @this.OauthClientCredentials; + + /// + /// + /// + public WebGetAuth(global::Vectara.WebGetOAuthClientCredentialsAuth? value) + { + OauthClientCredentials = value; + } + + /// + /// + /// + public static WebGetAuth FromOauthClientCredentials(global::Vectara.WebGetOAuthClientCredentialsAuth? value) => new WebGetAuth(value); + + /// + /// + /// + public static implicit operator WebGetAuth(global::Vectara.WebGetOAuthRefreshTokenAuth value) => new WebGetAuth((global::Vectara.WebGetOAuthRefreshTokenAuth?)value); + + /// + /// + /// + public static implicit operator global::Vectara.WebGetOAuthRefreshTokenAuth?(WebGetAuth @this) => @this.OauthRefreshToken; + + /// + /// + /// + public WebGetAuth(global::Vectara.WebGetOAuthRefreshTokenAuth? value) + { + OauthRefreshToken = value; + } + + /// + /// + /// + public static WebGetAuth FromOauthRefreshToken(global::Vectara.WebGetOAuthRefreshTokenAuth? value) => new WebGetAuth(value); + + /// + /// + /// + public WebGetAuth( + global::Vectara.WebGetAuthDiscriminatorType? type, + global::Vectara.WebGetNoAuth? none, + global::Vectara.WebGetBearerAuth? bearer, + global::Vectara.WebGetHeaderAuth? header, + global::Vectara.WebGetOAuthClientCredentialsAuth? oauthClientCredentials, + global::Vectara.WebGetOAuthRefreshTokenAuth? oauthRefreshToken + ) + { + Type = type; + + None = none; + Bearer = bearer; + Header = header; + OauthClientCredentials = oauthClientCredentials; + OauthRefreshToken = oauthRefreshToken; + } + + /// + /// + /// + public object? Object => + OauthRefreshToken as object ?? + OauthClientCredentials as object ?? + Header as object ?? + Bearer as object ?? + None as object + ; + + /// + /// + /// + public override string? ToString() => + None?.ToString() ?? + Bearer?.ToString() ?? + Header?.ToString() ?? + OauthClientCredentials?.ToString() ?? + OauthRefreshToken?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsNone && !IsBearer && !IsHeader && !IsOauthClientCredentials && !IsOauthRefreshToken || !IsNone && IsBearer && !IsHeader && !IsOauthClientCredentials && !IsOauthRefreshToken || !IsNone && !IsBearer && IsHeader && !IsOauthClientCredentials && !IsOauthRefreshToken || !IsNone && !IsBearer && !IsHeader && IsOauthClientCredentials && !IsOauthRefreshToken || !IsNone && !IsBearer && !IsHeader && !IsOauthClientCredentials && IsOauthRefreshToken; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? none = null, + global::System.Func? bearer = null, + global::System.Func? header = null, + global::System.Func? oauthClientCredentials = null, + global::System.Func? oauthRefreshToken = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsNone && none != null) + { + return none(None!); + } + else if (IsBearer && bearer != null) + { + return bearer(Bearer!); + } + else if (IsHeader && header != null) + { + return header(Header!); + } + else if (IsOauthClientCredentials && oauthClientCredentials != null) + { + return oauthClientCredentials(OauthClientCredentials!); + } + else if (IsOauthRefreshToken && oauthRefreshToken != null) + { + return oauthRefreshToken(OauthRefreshToken!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? none = null, + + global::System.Action? bearer = null, + + global::System.Action? header = null, + + global::System.Action? oauthClientCredentials = null, + + global::System.Action? oauthRefreshToken = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsNone) + { + none?.Invoke(None!); + } + else if (IsBearer) + { + bearer?.Invoke(Bearer!); + } + else if (IsHeader) + { + header?.Invoke(Header!); + } + else if (IsOauthClientCredentials) + { + oauthClientCredentials?.Invoke(OauthClientCredentials!); + } + else if (IsOauthRefreshToken) + { + oauthRefreshToken?.Invoke(OauthRefreshToken!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? none = null, + global::System.Action? bearer = null, + global::System.Action? header = null, + global::System.Action? oauthClientCredentials = null, + global::System.Action? oauthRefreshToken = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsNone) + { + none?.Invoke(None!); + } + else if (IsBearer) + { + bearer?.Invoke(Bearer!); + } + else if (IsHeader) + { + header?.Invoke(Header!); + } + else if (IsOauthClientCredentials) + { + oauthClientCredentials?.Invoke(OauthClientCredentials!); + } + else if (IsOauthRefreshToken) + { + oauthRefreshToken?.Invoke(OauthRefreshToken!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + None, + typeof(global::Vectara.WebGetNoAuth), + Bearer, + typeof(global::Vectara.WebGetBearerAuth), + Header, + typeof(global::Vectara.WebGetHeaderAuth), + OauthClientCredentials, + typeof(global::Vectara.WebGetOAuthClientCredentialsAuth), + OauthRefreshToken, + typeof(global::Vectara.WebGetOAuthRefreshTokenAuth), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(WebGetAuth other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(None, other.None) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Bearer, other.Bearer) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Header, other.Header) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OauthClientCredentials, other.OauthClientCredentials) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OauthRefreshToken, other.OauthRefreshToken) + ; + } + + /// + /// + /// + public static bool operator ==(WebGetAuth obj1, WebGetAuth obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(WebGetAuth obj1, WebGetAuth obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is WebGetAuth o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminator.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminator.Json.g.cs new file mode 100644 index 00000000..aa163a19 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WebGetAuthDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetAuthDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetAuthDiscriminator), + jsonSerializerContext) as global::Vectara.WebGetAuthDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetAuthDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetAuthDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetAuthDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminator.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminator.g.cs new file mode 100644 index 00000000..e0f69ac3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class WebGetAuthDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.WebGetAuthDiscriminatorTypeJsonConverter))] + public global::Vectara.WebGetAuthDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebGetAuthDiscriminator( + global::Vectara.WebGetAuthDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public WebGetAuthDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminatorType.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminatorType.g.cs new file mode 100644 index 00000000..d7e02a96 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetAuthDiscriminatorType.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public enum WebGetAuthDiscriminatorType + { + /// + /// + /// + Bearer, + /// + /// + /// + Header, + /// + /// + /// + None, + /// + /// + /// + OauthClientCredentials, + /// + /// + /// + OauthRefreshToken, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WebGetAuthDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WebGetAuthDiscriminatorType value) + { + return value switch + { + WebGetAuthDiscriminatorType.Bearer => "bearer", + WebGetAuthDiscriminatorType.Header => "header", + WebGetAuthDiscriminatorType.None => "none", + WebGetAuthDiscriminatorType.OauthClientCredentials => "oauth_client_credentials", + WebGetAuthDiscriminatorType.OauthRefreshToken => "oauth_refresh_token", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WebGetAuthDiscriminatorType? ToEnum(string value) + { + return value switch + { + "bearer" => WebGetAuthDiscriminatorType.Bearer, + "header" => WebGetAuthDiscriminatorType.Header, + "none" => WebGetAuthDiscriminatorType.None, + "oauth_client_credentials" => WebGetAuthDiscriminatorType.OauthClientCredentials, + "oauth_refresh_token" => WebGetAuthDiscriminatorType.OauthRefreshToken, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetBearerAuth.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetBearerAuth.Json.g.cs new file mode 100644 index 00000000..5fce23b2 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetBearerAuth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WebGetBearerAuth + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetBearerAuth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetBearerAuth), + jsonSerializerContext) as global::Vectara.WebGetBearerAuth; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetBearerAuth? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetBearerAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetBearerAuth; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetBearerAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetBearerAuth.g.cs new file mode 100644 index 00000000..a3b035e8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetBearerAuth.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Static bearer token authentication. Adds `Authorization: Bearer <token>`. + /// + public sealed partial class WebGetBearerAuth + { + /// + /// Default Value: bearer
+ /// Example: bearer + ///
+ /// "bearer" + /// bearer + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "bearer"; + + /// + /// The bearer token. May be an EagerReference to an agent secret. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf Token { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: bearer
+ /// Example: bearer + /// + /// + /// The bearer token. May be an EagerReference to an agent secret. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebGetBearerAuth( + string type, + global::Vectara.OneOf token) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Token = token; + } + + /// + /// Initializes a new instance of the class. + /// + public WebGetBearerAuth() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderAuth.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderAuth.Json.g.cs new file mode 100644 index 00000000..025f21da --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderAuth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WebGetHeaderAuth + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetHeaderAuth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetHeaderAuth), + jsonSerializerContext) as global::Vectara.WebGetHeaderAuth; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetHeaderAuth? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetHeaderAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetHeaderAuth; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderAuth.g.cs new file mode 100644 index 00000000..4c921d6f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderAuth.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Static custom-header authentication, suitable for API keys. + /// + public sealed partial class WebGetHeaderAuth + { + /// + /// Default Value: header
+ /// Example: header + ///
+ /// "header" + /// header + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "header"; + + /// + /// The header name to set (e.g. `X-API-Key`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("header")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Header { get; set; } + + /// + /// The header value. May be an EagerReference to an agent secret. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf Value { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: header
+ /// Example: header + /// + /// + /// The header name to set (e.g. `X-API-Key`). + /// + /// + /// The header value. May be an EagerReference to an agent secret. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebGetHeaderAuth( + string type, + string header, + global::Vectara.OneOf value) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Header = header ?? throw new global::System.ArgumentNullException(nameof(header)); + this.Value = value; + } + + /// + /// Initializes a new instance of the class. + /// + public WebGetHeaderAuth() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderValue.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderValue.Json.g.cs new file mode 100644 index 00000000..aad0c900 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderValue.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public readonly partial struct WebGetHeaderValue + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetHeaderValue? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetHeaderValue), + jsonSerializerContext) as global::Vectara.WebGetHeaderValue?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetHeaderValue? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetHeaderValue), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetHeaderValue?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderValue.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderValue.g.cs new file mode 100644 index 00000000..20193278 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeaderValue.g.cs @@ -0,0 +1,297 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Vectara +{ + /// + /// The value for a single HTTP header in the web_get tool. Either a literal string or an
+ /// EagerReference ({"$ref": "agent.secrets.foo"}) that resolves at session start so the
+ /// secret value never appears in the tool configuration. + ///
+ public readonly partial struct WebGetHeaderValue : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public string? WebGetHeaderValueVariant1 { get; init; } +#else + public string? WebGetHeaderValueVariant1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebGetHeaderValueVariant1))] +#endif + public bool IsWebGetHeaderValueVariant1 => WebGetHeaderValueVariant1 != null; + + /// + /// + /// + public bool TryPickWebGetHeaderValueVariant1( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out string? value) + { + value = WebGetHeaderValueVariant1; + return IsWebGetHeaderValueVariant1; + } + + /// + /// + /// + public string PickWebGetHeaderValueVariant1() => IsWebGetHeaderValueVariant1 + ? WebGetHeaderValueVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'WebGetHeaderValueVariant1' but the value was {ToString()}."); + + /// + /// A reference to a value resolved from the session context at the start of each turn. Resolution occurs when a new message is submitted to the agent session, before any LLM processing begins. The resolved value remains constant throughout the turn and is not re-evaluated during the agent's response or subsequent tool calls within the same turn. + /// +#if NET6_0_OR_GREATER + public global::Vectara.EagerReference? EagerReference { get; init; } +#else + public global::Vectara.EagerReference? EagerReference { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EagerReference))] +#endif + public bool IsEagerReference => EagerReference != null; + + /// + /// + /// + public bool TryPickEagerReference( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Vectara.EagerReference? value) + { + value = EagerReference; + return IsEagerReference; + } + + /// + /// + /// + public global::Vectara.EagerReference PickEagerReference() => IsEagerReference + ? EagerReference! + : throw new global::System.InvalidOperationException($"Expected union variant 'EagerReference' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator WebGetHeaderValue(string value) => new WebGetHeaderValue((string?)value); + + /// + /// + /// + public static implicit operator string?(WebGetHeaderValue @this) => @this.WebGetHeaderValueVariant1; + + /// + /// + /// + public WebGetHeaderValue(string? value) + { + WebGetHeaderValueVariant1 = value; + } + + /// + /// + /// + public static WebGetHeaderValue FromWebGetHeaderValueVariant1(string? value) => new WebGetHeaderValue(value); + + /// + /// + /// + public static implicit operator WebGetHeaderValue(global::Vectara.EagerReference value) => new WebGetHeaderValue((global::Vectara.EagerReference?)value); + + /// + /// + /// + public static implicit operator global::Vectara.EagerReference?(WebGetHeaderValue @this) => @this.EagerReference; + + /// + /// + /// + public WebGetHeaderValue(global::Vectara.EagerReference? value) + { + EagerReference = value; + } + + /// + /// + /// + public static WebGetHeaderValue FromEagerReference(global::Vectara.EagerReference? value) => new WebGetHeaderValue(value); + + /// + /// + /// + public WebGetHeaderValue( + string? webGetHeaderValueVariant1, + global::Vectara.EagerReference? eagerReference + ) + { + WebGetHeaderValueVariant1 = webGetHeaderValueVariant1; + EagerReference = eagerReference; + } + + /// + /// + /// + public object? Object => + EagerReference as object ?? + WebGetHeaderValueVariant1 as object + ; + + /// + /// + /// + public override string? ToString() => + WebGetHeaderValueVariant1?.ToString() ?? + EagerReference?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsWebGetHeaderValueVariant1 && !IsEagerReference || !IsWebGetHeaderValueVariant1 && IsEagerReference; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? webGetHeaderValueVariant1 = null, + global::System.Func? eagerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsWebGetHeaderValueVariant1 && webGetHeaderValueVariant1 != null) + { + return webGetHeaderValueVariant1(WebGetHeaderValueVariant1!); + } + else if (IsEagerReference && eagerReference != null) + { + return eagerReference(EagerReference!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? webGetHeaderValueVariant1 = null, + + global::System.Action? eagerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsWebGetHeaderValueVariant1) + { + webGetHeaderValueVariant1?.Invoke(WebGetHeaderValueVariant1!); + } + else if (IsEagerReference) + { + eagerReference?.Invoke(EagerReference!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? webGetHeaderValueVariant1 = null, + global::System.Action? eagerReference = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsWebGetHeaderValueVariant1) + { + webGetHeaderValueVariant1?.Invoke(WebGetHeaderValueVariant1!); + } + else if (IsEagerReference) + { + eagerReference?.Invoke(EagerReference!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + WebGetHeaderValueVariant1, + typeof(string), + EagerReference, + typeof(global::Vectara.EagerReference), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(WebGetHeaderValue other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebGetHeaderValueVariant1, other.WebGetHeaderValueVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(EagerReference, other.EagerReference) + ; + } + + /// + /// + /// + public static bool operator ==(WebGetHeaderValue obj1, WebGetHeaderValue obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(WebGetHeaderValue obj1, WebGetHeaderValue obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is WebGetHeaderValue o && Equals(o); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetHeadersMap.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeadersMap.Json.g.cs new file mode 100644 index 00000000..91c81866 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeadersMap.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WebGetHeadersMap + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetHeadersMap? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetHeadersMap), + jsonSerializerContext) as global::Vectara.WebGetHeadersMap; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetHeadersMap? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetHeadersMap), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetHeadersMap; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetHeadersMap.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeadersMap.g.cs new file mode 100644 index 00000000..051d0d98 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetHeadersMap.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// A map of HTTP header names to their values for the web_get tool. Each value may be a
+ /// literal string or an EagerReference for per-header secret resolution. + ///
+ public sealed partial class WebGetHeadersMap + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.Json.g.cs new file mode 100644 index 00000000..5dbdd46a --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WebGetNoAuth + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetNoAuth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetNoAuth), + jsonSerializerContext) as global::Vectara.WebGetNoAuth; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetNoAuth? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetNoAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetNoAuth; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs new file mode 100644 index 00000000..ec1232d3 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetNoAuth.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Explicitly disables authentication. Useful in argument_override to force a tool config to
+ /// clear any auth the LLM would otherwise supply, since merge semantics ignore null patches. + ///
+ public sealed partial class WebGetNoAuth + { + /// + /// Default Value: none
+ /// Example: none + ///
+ /// "none" + /// none + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "none"; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: none
+ /// Example: none + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebGetNoAuth( + string type) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + } + + /// + /// Initializes a new instance of the class. + /// + public WebGetNoAuth() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthClientCredentialsAuth.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthClientCredentialsAuth.Json.g.cs new file mode 100644 index 00000000..9b62ca60 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthClientCredentialsAuth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class WebGetOAuthClientCredentialsAuth + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.WebGetOAuthClientCredentialsAuth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.WebGetOAuthClientCredentialsAuth), + jsonSerializerContext) as global::Vectara.WebGetOAuthClientCredentialsAuth; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.WebGetOAuthClientCredentialsAuth? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.WebGetOAuthClientCredentialsAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetOAuthClientCredentialsAuth; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthClientCredentialsAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthClientCredentialsAuth.g.cs new file mode 100644 index 00000000..6799035e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthClientCredentialsAuth.g.cs @@ -0,0 +1,99 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// OAuth 2.0 client-credentials grant. The platform fetches an access token from the token
+ /// endpoint and caches it until it expires. + ///
+ public sealed partial class WebGetOAuthClientCredentialsAuth + { + /// + /// Default Value: oauth_client_credentials
+ /// Example: oauth_client_credentials + ///
+ /// "oauth_client_credentials" + /// oauth_client_credentials + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "oauth_client_credentials"; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_id")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf ClientId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_secret")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf ClientSecret { get; set; } + + /// + /// Example: https://auth.example.com/oauth2/token + /// + /// https://auth.example.com/oauth2/token + [global::System.Text.Json.Serialization.JsonPropertyName("token_endpoint")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenEndpoint { get; set; } + + /// + /// Example: [read:items] + /// + /// [read:items] + [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: oauth_client_credentials
+ /// Example: oauth_client_credentials + /// + /// + /// + /// + /// Example: https://auth.example.com/oauth2/token + /// + /// + /// Example: [read:items] + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebGetOAuthClientCredentialsAuth( + string type, + global::Vectara.OneOf clientId, + global::Vectara.OneOf clientSecret, + string tokenEndpoint, + global::System.Collections.Generic.IList? scopes) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ClientId = clientId; + this.ClientSecret = clientSecret; + this.TokenEndpoint = tokenEndpoint ?? throw new global::System.ArgumentNullException(nameof(tokenEndpoint)); + this.Scopes = scopes; + } + + /// + /// Initializes a new instance of the class. + /// + public WebGetOAuthClientCredentialsAuth() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParametersHeaders.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthRefreshTokenAuth.Json.g.cs similarity index 87% rename from src/libs/Vectara/Generated/Vectara.Models.WebGetToolParametersHeaders.Json.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthRefreshTokenAuth.Json.g.cs index 868054b5..82fc0630 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParametersHeaders.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthRefreshTokenAuth.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class WebGetToolParametersHeaders + public sealed partial class WebGetOAuthRefreshTokenAuth { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Vectara.WebGetToolParametersHeaders? FromJson( + public static global::Vectara.WebGetOAuthRefreshTokenAuth? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Vectara.WebGetToolParametersHeaders), - jsonSerializerContext) as global::Vectara.WebGetToolParametersHeaders; + typeof(global::Vectara.WebGetOAuthRefreshTokenAuth), + jsonSerializerContext) as global::Vectara.WebGetOAuthRefreshTokenAuth; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Vectara.WebGetToolParametersHeaders? FromJson( + public static global::Vectara.WebGetOAuthRefreshTokenAuth? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Vectara.WebGetToolParametersHeaders), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetToolParametersHeaders; + typeof(global::Vectara.WebGetOAuthRefreshTokenAuth), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.WebGetOAuthRefreshTokenAuth; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthRefreshTokenAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthRefreshTokenAuth.g.cs new file mode 100644 index 00000000..94739ada --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetOAuthRefreshTokenAuth.g.cs @@ -0,0 +1,99 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// OAuth 2.0 refresh-token grant. The platform exchanges a long-lived refresh token for an
+ /// access token and caches the result until it expires. Supports refresh-token rotation: if
+ /// the IdP returns a new refresh_token, subsequent refreshes use it automatically. + ///
+ public sealed partial class WebGetOAuthRefreshTokenAuth + { + /// + /// Default Value: oauth_refresh_token
+ /// Example: oauth_refresh_token + ///
+ /// "oauth_refresh_token" + /// oauth_refresh_token + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "oauth_refresh_token"; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_id")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf ClientId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_secret")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf ClientSecret { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("refresh_token")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.OneOf RefreshToken { get; set; } + + /// + /// Example: https://auth.example.com/oauth2/token + /// + /// https://auth.example.com/oauth2/token + [global::System.Text.Json.Serialization.JsonPropertyName("token_endpoint")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenEndpoint { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: oauth_refresh_token
+ /// Example: oauth_refresh_token + /// + /// + /// + /// + /// + /// Example: https://auth.example.com/oauth2/token + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebGetOAuthRefreshTokenAuth( + string type, + global::Vectara.OneOf clientId, + global::Vectara.OneOf clientSecret, + global::Vectara.OneOf refreshToken, + string tokenEndpoint) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ClientId = clientId; + this.ClientSecret = clientSecret; + this.RefreshToken = refreshToken; + this.TokenEndpoint = tokenEndpoint ?? throw new global::System.ArgumentNullException(nameof(tokenEndpoint)); + } + + /// + /// Initializes a new instance of the class. + /// + public WebGetOAuthRefreshTokenAuth() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParameters.g.cs b/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParameters.g.cs index 23386904..fd6e7de0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParameters.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.WebGetToolParameters.g.cs @@ -23,11 +23,14 @@ public sealed partial class WebGetToolParameters public global::Vectara.WebGetToolParametersMethod? Method { get; set; } /// - /// HTTP headers to include in the request. + /// HTTP headers to include in the request. Either a literal `{name: value}` map (where
+ /// each value may itself be a string OR an EagerReference for per-header secret lookup),
+ /// or an EagerReference ({"$ref": "agent.secrets"}) that resolves at session start to a
+ /// `Map<String, String>` (handy for sourcing the whole header set from agent secrets). ///
[global::System.Text.Json.Serialization.JsonPropertyName("headers")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter, global::Vectara.EagerReference>))] - public global::Vectara.OneOf, global::Vectara.EagerReference>? Headers { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] + public global::Vectara.OneOf? Headers { get; set; } /// /// Request body for POST/PUT requests. @@ -78,6 +81,13 @@ public sealed partial class WebGetToolParameters [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.OneOfJsonConverter))] public global::Vectara.OneOf? MaxContentBytes { get; set; } + /// + /// Authentication configuration for the outgoing HTTP request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("auth")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.WebGetAuthJsonConverter))] + public global::Vectara.WebGetAuth? Auth { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -94,7 +104,10 @@ public sealed partial class WebGetToolParameters /// HTTP method to use. /// /// - /// HTTP headers to include in the request. + /// HTTP headers to include in the request. Either a literal `{name: value}` map (where
+ /// each value may itself be a string OR an EagerReference for per-header secret lookup),
+ /// or an EagerReference ({"$ref": "agent.secrets"}) that resolves at session start to a
+ /// `Map<String, String>` (handy for sourcing the whole header set from agent secrets). /// /// /// Request body for POST/PUT requests. @@ -117,20 +130,24 @@ public sealed partial class WebGetToolParameters /// /// Maximum response size in bytes before truncation. /// + /// + /// Authentication configuration for the outgoing HTTP request. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public WebGetToolParameters( global::Vectara.OneOf? url, global::Vectara.WebGetToolParametersMethod? method, - global::Vectara.OneOf, global::Vectara.EagerReference>? headers, + global::Vectara.OneOf? headers, global::Vectara.OneOf? body, global::Vectara.OneOf? followRedirects, global::Vectara.OneOf? timeoutSeconds, global::Vectara.OneOf? headLines, global::Vectara.OneOf? tailLines, global::Vectara.OneOf? sslVerify, - global::Vectara.OneOf? maxContentBytes) + global::Vectara.OneOf? maxContentBytes, + global::Vectara.WebGetAuth? auth) { this.Url = url; this.Method = method; @@ -142,6 +159,7 @@ public WebGetToolParameters( this.TailLines = tailLines; this.SslVerify = sslVerify; this.MaxContentBytes = maxContentBytes; + this.Auth = auth; } /// diff --git a/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs b/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs index 6824ecdd..abb91f82 100644 --- a/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs +++ b/src/libs/Vectara/Generated/Vectara.UploadClient.File.g.cs @@ -721,6 +721,44 @@ request.Filename is null h => h.Value), }; } + // A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Vectara.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + throw new global::Vectara.ApiException( + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } // The media type of the uploaded file is not supported. if ((int)__response.StatusCode == 415) { @@ -1569,6 +1607,44 @@ request.Filename is null h => h.Value), }; } + // A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Vectara.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + throw new global::Vectara.ApiException( + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } // The media type of the uploaded file is not supported. if ((int)__response.StatusCode == 415) { @@ -2289,6 +2365,44 @@ request.Filename is null h => h.Value), }; } + // A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Vectara.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + throw new global::Vectara.ApiException( + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } // The media type of the uploaded file is not supported. if ((int)__response.StatusCode == 415) { diff --git a/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs b/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs index e925eeae..1597d216 100644 --- a/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs +++ b/src/libs/Vectara/Generated/Vectara.VectaraClient.g.cs @@ -157,6 +157,16 @@ public sealed partial class VectaraClient : global::Vectara.IVectaraClient, glob AutoSDKOAuth2State = AutoSDKOAuth2State, }; + /// + /// + /// + public CustomerMetricsClient CustomerMetrics => new CustomerMetricsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + AutoSDKOAuth2State = AutoSDKOAuth2State, + }; + /// /// /// diff --git a/src/libs/Vectara/Generated/autosdk.generated-examples.json b/src/libs/Vectara/Generated/autosdk.generated-examples.json index d50ea206..2fa8f737 100644 --- a/src/libs/Vectara/Generated/autosdk.generated-examples.json +++ b/src/libs/Vectara/Generated/autosdk.generated-examples.json @@ -193,7 +193,7 @@ "Slug": "uploadfile", "Description": "Upload a file to a corpus for automatic text extraction, chunking, and indexing. This endpoint is designed for unstructured documents where you want Vectara to handle parsing for you. Each uploaded file can be up to **10 MB**.\n\nSupported file types include:\n- Markdown (\u0060.md\u0060)\n- PDF/A (\u0060.pdf\u0060)\n- OpenOffice documents (\u0060.odt\u0060)\n- Microsoft Word (\u0060.doc\u0060, \u0060.docx\u0060)\n- Microsoft PowerPoint (\u0060.ppt\u0060, \u0060.pptx\u0060)\n- Plain text (\u0060.txt\u0060)\n- HTML (\u0060.html\u0060)\n- LXML (\u0060.lxml\u0060)\n- RTF (\u0060.rtf\u0060)\n- EPUB (\u0060.epub\u0060)\n- Email files (RFC 822) \n\n:::note\nFor semi-structured documents that require more control over fields or metadata, use the [**Create Corpus Document API**](/docs/rest-api/create-corpus-document) instead.\n:::\n\n## Additional format support through Vectara Ingest\n\nIf you need to ingest additional file types or data sources, you can use the open-source [**Vectara Ingest**](https://github.com/vectara/vectara-ingest) Python framework. It supports connectors for websites, RSS feeds, CSV, Confluence, HubSpot, ServiceNow, Jira, Notion, Slack, MediaWiki, GitHub, SharePoint, Twitter/X, YouTube, and more.\n\n:::caution\nVectara Ingest is provided as an open-source example and is not officially supported.\n:::\n\n## Multipart form fields\n\nThis endpoint expects a \u0060multipart/form-data\u0060 request with the following fields:\n\n- **metadata** (optional): JSON metadata to attach to the parsed document. \n Example: \u0060metadata={\u0022key\u0022:\u0022value\u0022}\u0060\n- **chunking_strategy** (optional): Controls how extracted text is chunked. \n Defaults to sentence-based chunking (one chunk per sentence). \n Example: \u0060{\u0022type\u0022:\u0022sentence_chunking_strategy\u0022}\u0060. \n Example for max character chunking: \u0060{\u0022type\u0022:\u0022max_chars_chunking_strategy\u0022,\u0022max_chars_per_chunk\u0022:512}\u0060\n- **table_extraction_config** (optional): Enables extraction of tables from supported file types such as PDFs. \n Example: \u0060{\u0022extract_tables\u0022: true}\u0060\n- **file** (required): The file to upload.\n- **filename** (required): The desired document ID, specified within the file upload field.\n\nApart from these parameters, the servers expect a valid JWT Token in the HTTP headers:\n\n\u0060\u0060\u0060curl\n\\$ curl -L -X POST \u0027https://api.vectara.io/v2/corpora/:corpus_key/upload_file\u0027 \\\n-H \u0027Content-Type: multipart/form-data\u0027 \\\n-H \u0027Accept: application/json\u0027 \\\n-H \u0027x-api-key: zwt_123456\u0027 \\\n-F \u0027metadata=\\{\u0022key\u0022: \u0022value\u0022\\};type=application/json\u0027 \\\n-F \u0027file=@/path/to/file/file.pdf;filename=desired_filename.pdf\u0027\n\n\u0060\u0060\u0060\n\n## Filenames with non-ASCII characters\n\nWhen uploading files with non-ASCII (non-English) characters, such as Russian or Chinese, ensure that the filename is URL encoded. The Vectara REST API follows web standards which require URL-encoded file names.\n\n## Set the document ID\n \nTo set a custom Document ID, pass it as the filename in the \u0060Content-Disposition\u0060 header:\n\n\u0060Content-Disposition: form-data; name=\u0022file\u0022; filename=\u0022your_document_id\u0022\u0060\n\nFor more information about Content-Disposition, see the [Mozilla documentation on headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition).\n\n## Attach additional metadata\n\nYou can attach additional metadata to the file by specifying a metadata form field, which can contain a JSON string:\n\n\u0060{ \u0022filesize\u0022: 1234 }\u0060\n\n## Tabular data extraction and summarization\n\nSetting \u0060table_extraction_config.extract_tables = true\u0060 enables extraction of tabular data (such as financial filings such as 10-K, 10-Q, S-1). You can also apply custom prompt templates to summarize table content during upload.\n\n:::caution\nTable extraction does not support scanned images of tables.\n:::\n\n## Custom table summarization with prompt templates\n\nVectara supports [table summarization using custom prompt templates](https://docs.vectara.com/docs/build/working-with-tables#summarize-tables-with-custom-prompts) during document upload. This lets you define custom prompt templates that control how the LLM interprets and summarizes table data during extraction. By customizing the prompt_template, you can tailor summaries for domain-specific language, analytical perspectives, or formatting preferences.\n\n## Image support\nYou can include images in structured documents using the [Indexing API](/docs/rest-api/create-corpus-document) with Base64 encoding. You cannot send images directly with individual query requests. If you want to retrieve a specific image that is embedded within a document, use the [Retrieve image API](/docs/rest-api/get-image)", "Language": "http", - "Code": "### Upload a file to the corpus\n# @name uploadFile\nPOST {{host}}/v2/corpora/{{corpus_key}}/upload_file\nx-api-key: {{api_key}}\nAuthorization: Bearer {{token}}\nRequest-Timeout: {{Request-Timeout}}\nRequest-Timeout-Millis: {{Request-Timeout-Millis}}\nContent-Type: multipart/form-data\nAccept: application/json\n\n## Responses\n# 201\n# Description: The extracted document has been parsed and added to the corpus.\n# Content-Type: application/json\n# 400\n# Description: Upload file request was malformed.\n# Content-Type: application/json\n# 403\n# Description: Permissions do not allow uploading a file to the corpus.\n# Content-Type: application/json\n# 404\n# Description: Corpus not found.\n# Content-Type: application/json\n# 415\n# Description: The media type of the uploaded file is not supported.\n# Content-Type: application/json", + "Code": "### Upload a file to the corpus\n# @name uploadFile\nPOST {{host}}/v2/corpora/{{corpus_key}}/upload_file\nx-api-key: {{api_key}}\nAuthorization: Bearer {{token}}\nRequest-Timeout: {{Request-Timeout}}\nRequest-Timeout-Millis: {{Request-Timeout-Millis}}\nContent-Type: multipart/form-data\nAccept: application/json\n\n## Responses\n# 201\n# Description: The extracted document has been parsed and added to the corpus.\n# Content-Type: application/json\n# 400\n# Description: Upload file request was malformed.\n# Content-Type: application/json\n# 403\n# Description: Permissions do not allow uploading a file to the corpus.\n# Content-Type: application/json\n# 404\n# Description: Corpus not found.\n# Content-Type: application/json\n# 409\n# Description: A document with the same document ID already exists in the corpus with different content. Delete the existing document first or use a unique document ID.\n# Content-Type: application/json\n# 415\n# Description: The media type of the uploaded file is not supported.\n# Content-Type: application/json", "Format": "http", "OperationId": "uploadFile", "Setup": null diff --git a/src/libs/Vectara/openapi.yaml b/src/libs/Vectara/openapi.yaml index 99fd930e..621e984f 100644 --- a/src/libs/Vectara/openapi.yaml +++ b/src/libs/Vectara/openapi.yaml @@ -89,6 +89,9 @@ tags: - name: Agent Analytics description: Inspect traces emitted by agent executions and retrieve evaluation data. +- name: CustomerMetrics + description: Query pre-aggregated time-series and distribution metrics scoped to + the authenticated customer. - name: Pipeline Dead Letters description: View and manage dead letters (failed records) for a pipeline. Dead letters are pipeline-scoped and can be retried individually or in bulk. @@ -1635,6 +1638,14 @@ paths: application/json: schema: $ref: '#/components/schemas/NotFoundError' + '409': + description: A document with the same document ID already exists in the + corpus with different content. Delete the existing document first or use + a unique document ID. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '415': description: The media type of the uploaded file is not supported. content: @@ -2382,9 +2393,9 @@ paths: temperature: 0.7 stream_response: false Finance: - summary: "Request to summarize a Q1 2025 financial report, using Vectara\u2019\ - s Omni LLM to highlight key financial metrics for a banking sector\ - \ corpus" + summary: Request to summarize a Q1 2025 financial report, using Vectara's + Omni LLM to highlight key financial metrics for a banking sector + corpus value: llm_name: vectara-summary-ext-24-05-med-omni prompt_template: Provide a concise summary of the financial report @@ -2428,9 +2439,9 @@ paths: in Delaware, focusing on arbitration, confidentiality, and termination terms. Finance: - summary: "Summarized a Q1 2025 financial report, highlighting revenue,\ - \ EBITDA margin, and net income using Vectara\u2019s Omni LLM\ - \ for a banking sector corpus" + summary: Summarized a Q1 2025 financial report, highlighting revenue, + EBITDA margin, and net income using Vectara's Omni LLM for a banking + sector corpus value: summary: The Q1 2025 financial report for the banking sector shows revenue of $150.2M, an EBITDA margin of 15.2%, and net income @@ -11917,6 +11928,111 @@ paths: cursor: $request.page_key next_cursor: $response.metadata.page_key results: $response.events + /v2/metrics: + get: + tags: + - CustomerMetrics + summary: List available metrics + x-required-roles: + - type: ApiRole + roles: + - viewer + - administrator + - owner + description: Returns the catalog of registered metrics that can be queried via + `/v2/metrics/{metric_name}`. Use this to discover metric names, kinds, and + supported labels. + operationId: listMetrics + x-fern-sdk-group-name: customer_metrics + x-fern-sdk-method-name: list + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + responses: + '200': + description: Catalog of registered metrics. + content: + application/json: + schema: + $ref: '#/components/schemas/ListMetricsResponse' + /v2/metrics/{metric_name}: + get: + tags: + - CustomerMetrics + summary: Query a metric time series + x-required-roles: + - type: ApiRole + roles: + - viewer + - administrator + - owner + description: Returns a time series of aggregated metric values for the named + metric within the requested time range. + operationId: getMetric + x-fern-sdk-group-name: customer_metrics + x-fern-sdk-method-name: get + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - name: metric_name + in: path + required: true + description: Name of the metric to query (see `/v2/metrics` for the catalog). + schema: + type: string + - name: labels + in: query + required: false + description: Label filters keyed by label name. The set of valid label names + for each metric is published in its descriptor at `/v2/metrics`. + style: deepObject + explode: true + schema: + type: object + additionalProperties: + type: array + minItems: 1 + items: + type: string + minLength: 1 + - name: start + in: query + required: true + description: Inclusive start of the query window (ISO 8601). Must be no more + than 30 days before now. + schema: + type: string + format: date-time + - name: end + in: query + required: true + description: Exclusive end of the query window (ISO 8601). Must be after `start`. + schema: + type: string + format: date-time + - name: max_buckets + in: query + required: false + description: Upper bound on the number of points in the response. The response + may contain fewer points than requested but never more. The actual bucket + size is reported in the response as `bucket_size_seconds`. Defaults to 60. + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + default: 60 + responses: + '200': + description: The requested metric series. + content: + application/json: + schema: + $ref: '#/components/schemas/MetricSeries' + '400': + description: Invalid request parameters. + '404': + description: The named metric is not registered. /v2/agent_analytics/traces: get: tags: @@ -12185,6 +12301,21 @@ paths: - step_transition - image_read - compaction + - name: parent_span_id + in: query + description: Filter spans to only direct children of this span ID. + required: false + schema: + type: string + - name: exclude_subagents + in: query + description: When true, exclude nested sub-agent invocations and their descendants. + Restricts results to the entry-point invoke_agent span and any spans that + belong to the entry agent's session. + required: false + schema: + type: boolean + default: false - name: limit in: query description: The maximum number of spans to return. @@ -19643,6 +19774,179 @@ components: - type x-vectaraParents: - AgentToolConfiguration + WebGetHeaderValue: + description: 'The value for a single HTTP header in the web_get tool. Either + a literal string or an + + EagerReference ({"$ref": "agent.secrets.foo"}) that resolves at session start + so the + + secret value never appears in the tool configuration. + + ' + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + WebGetHeadersMap: + description: 'A map of HTTP header names to their values for the web_get tool. + Each value may be a + + literal string or an EagerReference for per-header secret resolution. + + ' + type: object + additionalProperties: + $ref: '#/components/schemas/WebGetHeaderValue' + WebGetNoAuth: + description: 'Explicitly disables authentication. Useful in argument_override + to force a tool config to + + clear any auth the LLM would otherwise supply, since merge semantics ignore + null patches.' + type: object + properties: + type: + type: string + default: none + example: none + required: + - type + x-vectaraParents: + - WebGetAuth + WebGetBearerAuth: + description: 'Static bearer token authentication. Adds `Authorization: Bearer + `.' + type: object + properties: + type: + type: string + default: bearer + example: bearer + token: + description: The bearer token. May be an EagerReference to an agent secret. + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + required: + - type + - token + x-vectaraParents: + - WebGetAuth + WebGetHeaderAuth: + description: Static custom-header authentication, suitable for API keys. + type: object + properties: + type: + type: string + default: header + example: header + header: + description: The header name to set (e.g. `X-API-Key`). + type: string + value: + description: The header value. May be an EagerReference to an agent secret. + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + required: + - type + - header + - value + x-vectaraParents: + - WebGetAuth + WebGetOAuthClientCredentialsAuth: + description: 'OAuth 2.0 client-credentials grant. The platform fetches an access + token from the token + + endpoint and caches it until it expires.' + type: object + properties: + type: + type: string + default: oauth_client_credentials + example: oauth_client_credentials + client_id: + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + client_secret: + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + token_endpoint: + type: string + format: uri + example: https://auth.example.com/oauth2/token + scopes: + type: array + items: + type: string + example: + - read:items + required: + - type + - client_id + - client_secret + - token_endpoint + x-vectaraParents: + - WebGetAuth + WebGetOAuthRefreshTokenAuth: + description: 'OAuth 2.0 refresh-token grant. The platform exchanges a long-lived + refresh token for an + + access token and caches the result until it expires. Supports refresh-token + rotation: if + + the IdP returns a new refresh_token, subsequent refreshes use it automatically.' + type: object + properties: + type: + type: string + default: oauth_refresh_token + example: oauth_refresh_token + client_id: + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + client_secret: + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + refresh_token: + oneOf: + - type: string + - $ref: '#/components/schemas/EagerReference' + token_endpoint: + type: string + format: uri + example: https://auth.example.com/oauth2/token + required: + - type + - client_id + - client_secret + - refresh_token + - token_endpoint + x-vectaraParents: + - WebGetAuth + WebGetAuth: + description: Authentication configuration for the outgoing HTTP request. + type: object + discriminator: + propertyName: type + mapping: + none: '#/components/schemas/WebGetNoAuth' + bearer: '#/components/schemas/WebGetBearerAuth' + header: '#/components/schemas/WebGetHeaderAuth' + oauth_client_credentials: '#/components/schemas/WebGetOAuthClientCredentialsAuth' + oauth_refresh_token: '#/components/schemas/WebGetOAuthRefreshTokenAuth' + oneOf: + - $ref: '#/components/schemas/WebGetNoAuth' + - $ref: '#/components/schemas/WebGetBearerAuth' + - $ref: '#/components/schemas/WebGetHeaderAuth' + - $ref: '#/components/schemas/WebGetOAuthClientCredentialsAuth' + - $ref: '#/components/schemas/WebGetOAuthRefreshTokenAuth' + required: + - type WebGetToolParameters: description: Configurable parameters for the web get tool. If not provided, will be filled in by the agent. @@ -19663,11 +19967,22 @@ components: - DELETE - HEAD headers: - description: HTTP headers to include in the request. + description: 'HTTP headers to include in the request. Either a literal `{name: + value}` map (where + + each value may itself be a string OR an EagerReference for per-header + secret lookup), + + or an EagerReference ({"$ref": "agent.secrets"}) that resolves at session + start to a + + `Map` (handy for sourcing the whole header set from agent + secrets). + + ' + x-vectara-default-subtype: WebGetHeadersMap oneOf: - - type: object - additionalProperties: - type: string + - $ref: '#/components/schemas/WebGetHeadersMap' - $ref: '#/components/schemas/EagerReference' body: description: Request body for POST/PUT requests. @@ -19704,6 +20019,21 @@ components: oneOf: - type: integer - $ref: '#/components/schemas/EagerReference' + auth: + description: 'Optional authentication to apply to the request. The resulting + credential header is + + merged with `headers`; on conflict on exact header name (case-sensitive, + as given), `headers` wins. OAuth + + access tokens are cached in-process per credential set. Any credential + field can be an + + EagerReference ({"$ref": "agent.secrets.foo"}) so secrets never appear + in the + + configuration plaintext.' + $ref: '#/components/schemas/WebGetAuth' additionalProperties: false InlineWebGetToolConfiguration: title: InlineWebGetToolConfiguration @@ -24647,6 +24977,254 @@ components: required: - events - metadata + MetricKind: + description: 'The kind of metric. Determines combine semantics when filtering + across multiple label values and the shape of points in the response: + + + - `counter`: monotonic count or sum (trace count, error count, token totals). + Combined by summing. Returns `ScalarMetricPoint`s. + + - `gauge`: point-in-time value (mean, max, distinct-count). Combined per the + underlying aggregate state (weighted mean for averages, max for maxima, distinct-count + for uniq metrics). Returns `ScalarMetricPoint`s. + + - `percentiles`: distribution percentiles over a t-digest aggregate. Combined + by merging t-digest states. Returns `PercentilesMetricPoint`s. + + - `distribution`: histogram of value-bucketed counts. Combined by summing + per-bin counts. Returns `DistributionMetricPoint`s. + + ' + type: string + enum: + - counter + - gauge + - percentiles + - distribution + MetricDescriptor: + description: Metadata about a registered metric available for querying. + type: object + properties: + name: + description: The unique name of the metric, used as the path parameter to + query it. + type: string + example: agent.trace.duration_ms + description: + description: Human-readable description of what the metric measures. + type: string + unit: + description: Unit of measure for the metric values, when applicable. + type: string + example: ms + kind: + $ref: '#/components/schemas/MetricKind' + labels: + description: Names of labels that can be used to filter this metric. + type: array + items: + type: string + example: + - agent_keys + required: + - name + - description + - kind + - labels + ListMetricsResponse: + description: List of registered metrics available for querying. + type: object + properties: + metrics: + type: array + items: + $ref: '#/components/schemas/MetricDescriptor' + required: + - metrics + MetricSeriesBase: + description: Common properties shared by all metric series kinds. + type: object + properties: + metric_name: + description: The name of the metric this series describes. + type: string + labels: + description: The labels matched for this series. Echoes the filter values + supplied in the request. + type: object + additionalProperties: + type: array + items: + type: string + bucket_size_seconds: + description: Width of each bucket in the returned series, in seconds. The + server chooses this based on the requested time range and `max_buckets`. + type: integer + format: int32 + required: + - metric_name + - labels + - bucket_size_seconds + ScalarMetricPoint: + description: "A point in a counter or gauge metric series \u2014 a single scalar\ + \ value at a time bucket." + type: object + properties: + bucket_start: + description: Start of the bucket window in ISO 8601 (UTC). End-time aligned. + type: string + format: date-time + value: + description: The aggregated value for this bucket. + type: number + format: double + required: + - bucket_start + - value + CounterMetricSeries: + description: A series of counter values (monotonic count or sum). + allOf: + - $ref: '#/components/schemas/MetricSeriesBase' + - type: object + properties: + kind: + type: string + default: counter + example: counter + points: + type: array + items: + $ref: '#/components/schemas/ScalarMetricPoint' + required: + - kind + - points + GaugeMetricSeries: + description: A series of gauge values (point-in-time aggregates such as mean, + max, distinct count). + allOf: + - $ref: '#/components/schemas/MetricSeriesBase' + - type: object + properties: + kind: + type: string + default: gauge + example: gauge + points: + type: array + items: + $ref: '#/components/schemas/ScalarMetricPoint' + required: + - kind + - points + PercentilesMetricPoint: + description: A point in a percentiles metric series. + type: object + properties: + bucket_start: + description: Start of the bucket window in ISO 8601 (UTC). End-time aligned. + type: string + format: date-time + percentiles: + description: Map of percentile label to value. Keys follow the `p` convention + (e.g. `p50`, `p99`, `p99_9` for the 99.9th percentile). + type: object + additionalProperties: + type: number + format: double + required: + - bucket_start + - percentiles + PercentilesMetricSeries: + description: A series of percentile aggregates over a t-digest state. + allOf: + - $ref: '#/components/schemas/MetricSeriesBase' + - type: object + properties: + kind: + type: string + default: percentiles + example: percentiles + points: + type: array + items: + $ref: '#/components/schemas/PercentilesMetricPoint' + required: + - kind + - points + HistogramBin: + description: "A single bin in a distribution histogram. `upper_ms` is null for\ + \ the overflow bin (everything \u2265 the lower bound)." + type: object + properties: + lower_ms: + description: Inclusive lower bound of the bin in milliseconds. + type: number + format: double + upper_ms: + description: Exclusive upper bound of the bin in milliseconds. Null for + the overflow bin. + type: number + format: double + nullable: true + count: + description: Number of observations whose duration fell in `[lower_ms, upper_ms)`. + type: integer + format: int64 + required: + - lower_ms + - count + DistributionMetricPoint: + description: "A point in a distribution metric series \u2014 a histogram of\ + \ value-bucketed counts at a time bucket. Only bins with non-zero counts appear." + type: object + properties: + bucket_start: + description: Start of the bucket window in ISO 8601 (UTC). End-time aligned. + type: string + format: date-time + bins: + description: Histogram bins, sorted by `lower_ms` ascending. + type: array + items: + $ref: '#/components/schemas/HistogramBin' + required: + - bucket_start + - bins + DistributionMetricSeries: + description: A series of histogram aggregates over a value-axis distribution + table. + allOf: + - $ref: '#/components/schemas/MetricSeriesBase' + - type: object + properties: + kind: + type: string + default: distribution + example: distribution + points: + type: array + items: + $ref: '#/components/schemas/DistributionMetricPoint' + required: + - kind + - points + MetricSeries: + description: A time series of metric points. The shape of points varies by metric + kind. + x-vectara-base-schema: '#/MetricSeriesBase' + discriminator: + propertyName: kind + mapping: + counter: '#/components/schemas/CounterMetricSeries' + gauge: '#/components/schemas/GaugeMetricSeries' + percentiles: '#/components/schemas/PercentilesMetricSeries' + distribution: '#/components/schemas/DistributionMetricSeries' + oneOf: + - $ref: '#/components/schemas/CounterMetricSeries' + - $ref: '#/components/schemas/GaugeMetricSeries' + - $ref: '#/components/schemas/PercentilesMetricSeries' + - $ref: '#/components/schemas/DistributionMetricSeries' AgentTrace: description: A summary of an agent trace representing one complete agent invocation. type: object @@ -24737,11 +25315,15 @@ components: description: The name of the agent step active when this span was created. type: string nullable: true + has_children: + description: Whether this span has child spans. + type: boolean required: - span_id - trace_id - started_at - status + - has_children AgentTraceInputFile: description: Metadata for a file uploaded alongside an agent input message. type: object @@ -24809,6 +25391,21 @@ components: type: array items: $ref: '#/components/schemas/AgentTraceInputFile' + parent_agent_id: + description: For sub-agent invocations, the agent_id of the agent that invoked + this one. Null for entry-point agents. + type: string + nullable: true + parent_session_id: + description: For sub-agent invocations, the session_key of the parent agent + session. Null for entry-point agents. + type: string + nullable: true + depth: + description: Nesting depth of this agent invocation. 0 for entry-point agents, + 1 for first-level sub-agents, and so on. + type: integer + format: int32 InvokeAgentSpanContent: description: Decrypted content of an invoke_agent span. type: object @@ -25416,6 +26013,7 @@ x-tagGroups: - Agent Analytics - Query History - Jobs + - CustomerMetrics - name: Platform tags: - Large Language Models