diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsCallsCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsCallsCreate.g.cs index e7c9e3d..6b4f306 100644 --- a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsCallsCreate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsCallsCreate.g.cs @@ -28,11 +28,13 @@ public partial class AgentsClient partial void PrepareAgentsCallsCreateArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid agentId, + ref string? throttle, global::Ultravox.UltravoxV1StartAgentCallRequest request); partial void PrepareAgentsCallsCreateRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, global::System.Guid agentId, + string? throttle, global::Ultravox.UltravoxV1StartAgentCallRequest request); partial void ProcessAgentsCallsCreateResponse( global::System.Net.Http.HttpClient httpClient, @@ -47,6 +49,7 @@ partial void ProcessAgentsCallsCreateResponseContent( /// /// /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -55,6 +58,7 @@ partial void ProcessAgentsCallsCreateResponseContent( global::System.Guid agentId, global::Ultravox.UltravoxV1StartAgentCallRequest request, + string? throttle = default, global::Ultravox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -65,6 +69,7 @@ partial void ProcessAgentsCallsCreateResponseContent( PrepareAgentsCallsCreateArguments( httpClient: HttpClient, agentId: ref agentId, + throttle: ref throttle, request: request); @@ -91,7 +96,10 @@ partial void ProcessAgentsCallsCreateResponseContent( { var __pathBuilder = new global::Ultravox.PathBuilder( path: $"/api/agents/{agentId}/calls", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("throttle", throttle) + ; var __path = __pathBuilder.ToString(); __path = global::Ultravox.AutoSDKRequestOptionsSupport.AppendQueryParameters( path: __path, @@ -139,6 +147,7 @@ partial void ProcessAgentsCallsCreateResponseContent( httpClient: HttpClient, httpRequestMessage: __httpRequest, agentId: agentId, + throttle: throttle, request: request); return __httpRequest; @@ -396,6 +405,7 @@ partial void ProcessAgentsCallsCreateResponseContent( /// /// /// + /// /// /// Context for filling any mustache templates for the call. /// @@ -466,6 +476,7 @@ partial void ProcessAgentsCallsCreateResponseContent( /// public async global::System.Threading.Tasks.Task AgentsCallsCreateAsync( global::System.Guid agentId, + string? throttle = default, object? templateContext = default, global::System.Collections.Generic.IList? initialMessages = default, global::System.Collections.Generic.Dictionary? metadata = default, @@ -509,6 +520,7 @@ partial void ProcessAgentsCallsCreateResponseContent( return await AgentsCallsCreateAsync( agentId: agentId, + throttle: throttle, request: __request, requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesCreate.g.cs index 5126ddd..df35940 100644 --- a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesCreate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesCreate.g.cs @@ -402,6 +402,9 @@ partial void ProcessAgentsScheduledBatchesCreateResponseContent( /// /// The end of the time window during which calls can be made. /// + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -420,6 +423,7 @@ partial void ProcessAgentsScheduledBatchesCreateResponseContent( global::System.Collections.Generic.IList calls, global::System.DateTime? windowStart = default, global::System.DateTime? windowEnd = default, + string? throttle = default, string? webhookUrl = default, string? webhookSecret = default, bool? paused = default, @@ -430,6 +434,7 @@ partial void ProcessAgentsScheduledBatchesCreateResponseContent( { WindowStart = windowStart, WindowEnd = windowEnd, + Throttle = throttle, WebhookUrl = webhookUrl, WebhookSecret = webhookSecret, Paused = paused, diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs index 65297d9..a92e9b9 100644 --- a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs @@ -409,6 +409,9 @@ partial void ProcessAgentsScheduledBatchesPartialUpdateResponseContent( /// /// The end of the time window during which calls can be made. /// + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -428,6 +431,7 @@ partial void ProcessAgentsScheduledBatchesPartialUpdateResponseContent( global::System.Collections.Generic.IList calls, global::System.DateTime? windowStart = default, global::System.DateTime? windowEnd = default, + string? throttle = default, string? webhookUrl = default, string? webhookSecret = default, bool? paused = default, @@ -438,6 +442,7 @@ partial void ProcessAgentsScheduledBatchesPartialUpdateResponseContent( { WindowStart = windowStart, WindowEnd = windowEnd, + Throttle = throttle, WebhookUrl = webhookUrl, WebhookSecret = webhookSecret, Paused = paused, diff --git a/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesCreate.g.cs new file mode 100644 index 0000000..48f71f6 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesCreate.g.cs @@ -0,0 +1,415 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class CallThrottlesClient + { + + + private static readonly global::Ultravox.EndPointSecurityRequirement s_CallThrottlesCreateSecurityRequirement0 = + new global::Ultravox.EndPointSecurityRequirement + { + Authorizations = new global::Ultravox.EndPointAuthorizationRequirement[] + { new global::Ultravox.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Ultravox.EndPointSecurityRequirement[] s_CallThrottlesCreateSecurityRequirements = + new global::Ultravox.EndPointSecurityRequirement[] + { s_CallThrottlesCreateSecurityRequirement0, + }; + partial void PrepareCallThrottlesCreateArguments( + global::System.Net.Http.HttpClient httpClient, + global::Ultravox.CallThrottle request); + partial void PrepareCallThrottlesCreateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Ultravox.CallThrottle request); + partial void ProcessCallThrottlesCreateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCallThrottlesCreateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a new call throttle. + /// + /// + /// 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 CallThrottlesCreateAsync( + + global::Ultravox.CallThrottle request, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCallThrottlesCreateArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Ultravox.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallThrottlesCreateSecurityRequirements, + operationName: "CallThrottlesCreateAsync"); + + using var __timeoutCancellationTokenSource = global::Ultravox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Ultravox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Ultravox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::Ultravox.PathBuilder( + path: "/api/call_throttles", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Ultravox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallThrottlesCreateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Ultravox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesCreate", + methodName: "CallThrottlesCreateAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesCreate", + methodName: "CallThrottlesCreateAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Ultravox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesCreate", + methodName: "CallThrottlesCreateAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCallThrottlesCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesCreate", + methodName: "CallThrottlesCreateAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesCreate", + methodName: "CallThrottlesCreateAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + 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); + ProcessCallThrottlesCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.CallThrottle.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Ultravox.CallThrottle.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Ultravox.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(); + } + } + /// + /// Creates a new call throttle. + /// + /// + /// + /// 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 CallThrottlesCreateAsync( + string name, + global::System.Collections.Generic.IList rules, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ultravox.CallThrottle + { + Name = name, + Rules = rules, + }; + + return await CallThrottlesCreateAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesDestroy.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesDestroy.g.cs new file mode 100644 index 0000000..95d5fe3 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesDestroy.g.cs @@ -0,0 +1,360 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class CallThrottlesClient + { + + + private static readonly global::Ultravox.EndPointSecurityRequirement s_CallThrottlesDestroySecurityRequirement0 = + new global::Ultravox.EndPointSecurityRequirement + { + Authorizations = new global::Ultravox.EndPointAuthorizationRequirement[] + { new global::Ultravox.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Ultravox.EndPointSecurityRequirement[] s_CallThrottlesDestroySecurityRequirements = + new global::Ultravox.EndPointSecurityRequirement[] + { s_CallThrottlesDestroySecurityRequirement0, + }; + partial void PrepareCallThrottlesDestroyArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid throttleId); + partial void PrepareCallThrottlesDestroyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid throttleId); + partial void ProcessCallThrottlesDestroyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Deletes a call throttle. + /// + /// + /// 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 CallThrottlesDestroyAsync( + global::System.Guid throttleId, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCallThrottlesDestroyArguments( + httpClient: HttpClient, + throttleId: ref throttleId); + + + var __authorizations = global::Ultravox.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallThrottlesDestroySecurityRequirements, + operationName: "CallThrottlesDestroyAsync"); + + using var __timeoutCancellationTokenSource = global::Ultravox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Ultravox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Ultravox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/call_throttles/{throttleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Ultravox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallThrottlesDestroyRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + throttleId: throttleId); + + 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::Ultravox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesDestroy", + methodName: "CallThrottlesDestroyAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesDestroy", + methodName: "CallThrottlesDestroyAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Ultravox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesDestroy", + methodName: "CallThrottlesDestroyAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCallThrottlesDestroyResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesDestroy", + methodName: "CallThrottlesDestroyAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesDestroy", + methodName: "CallThrottlesDestroyAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "DELETE", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + 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); + + try + { + __response.EnsureSuccessStatusCode(); + + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Ultravox.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/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesList.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesList.g.cs new file mode 100644 index 0000000..b5d0987 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesList.g.cs @@ -0,0 +1,391 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class CallThrottlesClient + { + + + private static readonly global::Ultravox.EndPointSecurityRequirement s_CallThrottlesListSecurityRequirement0 = + new global::Ultravox.EndPointSecurityRequirement + { + Authorizations = new global::Ultravox.EndPointAuthorizationRequirement[] + { new global::Ultravox.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Ultravox.EndPointSecurityRequirement[] s_CallThrottlesListSecurityRequirements = + new global::Ultravox.EndPointSecurityRequirement[] + { s_CallThrottlesListSecurityRequirement0, + }; + partial void PrepareCallThrottlesListArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? cursor, + ref int? pageSize); + partial void PrepareCallThrottlesListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? cursor, + int? pageSize); + partial void ProcessCallThrottlesListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCallThrottlesListResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists call throttles for the current account. + /// + /// + /// + /// 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 CallThrottlesListAsync( + string? cursor = default, + int? pageSize = default, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCallThrottlesListArguments( + httpClient: HttpClient, + cursor: ref cursor, + pageSize: ref pageSize); + + + var __authorizations = global::Ultravox.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallThrottlesListSecurityRequirements, + operationName: "CallThrottlesListAsync"); + + using var __timeoutCancellationTokenSource = global::Ultravox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Ultravox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Ultravox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::Ultravox.PathBuilder( + path: "/api/call_throttles", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("pageSize", pageSize?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Ultravox.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); + } + } + global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallThrottlesListRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + cursor: cursor, + pageSize: pageSize); + + 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::Ultravox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesList", + methodName: "CallThrottlesListAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesList", + methodName: "CallThrottlesListAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Ultravox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesList", + methodName: "CallThrottlesListAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCallThrottlesListResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesList", + methodName: "CallThrottlesListAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesList", + methodName: "CallThrottlesListAsync", + pathTemplate: "\"/api/call_throttles\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + 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); + ProcessCallThrottlesListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.PaginatedCallThrottleList.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Ultravox.PaginatedCallThrottleList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Ultravox.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/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesPartialUpdate.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesPartialUpdate.g.cs new file mode 100644 index 0000000..ed91257 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesPartialUpdate.g.cs @@ -0,0 +1,424 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class CallThrottlesClient + { + + + private static readonly global::Ultravox.EndPointSecurityRequirement s_CallThrottlesPartialUpdateSecurityRequirement0 = + new global::Ultravox.EndPointSecurityRequirement + { + Authorizations = new global::Ultravox.EndPointAuthorizationRequirement[] + { new global::Ultravox.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Ultravox.EndPointSecurityRequirement[] s_CallThrottlesPartialUpdateSecurityRequirements = + new global::Ultravox.EndPointSecurityRequirement[] + { s_CallThrottlesPartialUpdateSecurityRequirement0, + }; + partial void PrepareCallThrottlesPartialUpdateArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid throttleId, + global::Ultravox.PatchedCallThrottle request); + partial void PrepareCallThrottlesPartialUpdateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid throttleId, + global::Ultravox.PatchedCallThrottle request); + partial void ProcessCallThrottlesPartialUpdateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCallThrottlesPartialUpdateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Partially updates a call throttle. + /// + /// + /// + /// 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 CallThrottlesPartialUpdateAsync( + global::System.Guid throttleId, + + global::Ultravox.PatchedCallThrottle request, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCallThrottlesPartialUpdateArguments( + httpClient: HttpClient, + throttleId: ref throttleId, + request: request); + + + var __authorizations = global::Ultravox.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallThrottlesPartialUpdateSecurityRequirements, + operationName: "CallThrottlesPartialUpdateAsync"); + + using var __timeoutCancellationTokenSource = global::Ultravox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Ultravox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Ultravox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/call_throttles/{throttleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Ultravox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallThrottlesPartialUpdateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + throttleId: throttleId, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Ultravox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesPartialUpdate", + methodName: "CallThrottlesPartialUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesPartialUpdate", + methodName: "CallThrottlesPartialUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Ultravox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesPartialUpdate", + methodName: "CallThrottlesPartialUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCallThrottlesPartialUpdateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesPartialUpdate", + methodName: "CallThrottlesPartialUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesPartialUpdate", + methodName: "CallThrottlesPartialUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + 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); + ProcessCallThrottlesPartialUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.CallThrottle.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Ultravox.CallThrottle.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Ultravox.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(); + } + } + /// + /// Partially updates a call throttle. + /// + /// + /// + /// + /// 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 CallThrottlesPartialUpdateAsync( + global::System.Guid throttleId, + string? name = default, + global::System.Collections.Generic.IList? rules = default, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ultravox.PatchedCallThrottle + { + Name = name, + Rules = rules, + }; + + return await CallThrottlesPartialUpdateAsync( + throttleId: throttleId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesRetrieve.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesRetrieve.g.cs new file mode 100644 index 0000000..54d5ad2 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesRetrieve.g.cs @@ -0,0 +1,381 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class CallThrottlesClient + { + + + private static readonly global::Ultravox.EndPointSecurityRequirement s_CallThrottlesRetrieveSecurityRequirement0 = + new global::Ultravox.EndPointSecurityRequirement + { + Authorizations = new global::Ultravox.EndPointAuthorizationRequirement[] + { new global::Ultravox.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Ultravox.EndPointSecurityRequirement[] s_CallThrottlesRetrieveSecurityRequirements = + new global::Ultravox.EndPointSecurityRequirement[] + { s_CallThrottlesRetrieveSecurityRequirement0, + }; + partial void PrepareCallThrottlesRetrieveArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid throttleId); + partial void PrepareCallThrottlesRetrieveRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid throttleId); + partial void ProcessCallThrottlesRetrieveResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCallThrottlesRetrieveResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Gets a call throttle. + /// + /// + /// 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 CallThrottlesRetrieveAsync( + global::System.Guid throttleId, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCallThrottlesRetrieveArguments( + httpClient: HttpClient, + throttleId: ref throttleId); + + + var __authorizations = global::Ultravox.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallThrottlesRetrieveSecurityRequirements, + operationName: "CallThrottlesRetrieveAsync"); + + using var __timeoutCancellationTokenSource = global::Ultravox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Ultravox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Ultravox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/call_throttles/{throttleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Ultravox.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); + } + } + global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallThrottlesRetrieveRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + throttleId: throttleId); + + 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::Ultravox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesRetrieve", + methodName: "CallThrottlesRetrieveAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesRetrieve", + methodName: "CallThrottlesRetrieveAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Ultravox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesRetrieve", + methodName: "CallThrottlesRetrieveAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCallThrottlesRetrieveResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesRetrieve", + methodName: "CallThrottlesRetrieveAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesRetrieve", + methodName: "CallThrottlesRetrieveAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + 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); + ProcessCallThrottlesRetrieveResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.CallThrottle.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Ultravox.CallThrottle.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Ultravox.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/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesUpdate.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesUpdate.g.cs new file mode 100644 index 0000000..3caa558 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.CallThrottlesUpdate.g.cs @@ -0,0 +1,424 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class CallThrottlesClient + { + + + private static readonly global::Ultravox.EndPointSecurityRequirement s_CallThrottlesUpdateSecurityRequirement0 = + new global::Ultravox.EndPointSecurityRequirement + { + Authorizations = new global::Ultravox.EndPointAuthorizationRequirement[] + { new global::Ultravox.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApikeyXApiKey", + Location = "Header", + Name = "X-API-Key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Ultravox.EndPointSecurityRequirement[] s_CallThrottlesUpdateSecurityRequirements = + new global::Ultravox.EndPointSecurityRequirement[] + { s_CallThrottlesUpdateSecurityRequirement0, + }; + partial void PrepareCallThrottlesUpdateArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid throttleId, + global::Ultravox.CallThrottle request); + partial void PrepareCallThrottlesUpdateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid throttleId, + global::Ultravox.CallThrottle request); + partial void ProcessCallThrottlesUpdateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCallThrottlesUpdateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates a call throttle (full replacement). + /// + /// + /// + /// 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 CallThrottlesUpdateAsync( + global::System.Guid throttleId, + + global::Ultravox.CallThrottle request, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCallThrottlesUpdateArguments( + httpClient: HttpClient, + throttleId: ref throttleId, + request: request); + + + var __authorizations = global::Ultravox.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CallThrottlesUpdateSecurityRequirements, + operationName: "CallThrottlesUpdateAsync"); + + using var __timeoutCancellationTokenSource = global::Ultravox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Ultravox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Ultravox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/call_throttles/{throttleId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Ultravox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCallThrottlesUpdateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + throttleId: throttleId, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Ultravox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesUpdate", + methodName: "CallThrottlesUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesUpdate", + methodName: "CallThrottlesUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Ultravox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesUpdate", + methodName: "CallThrottlesUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Ultravox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCallThrottlesUpdateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesUpdate", + methodName: "CallThrottlesUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Ultravox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Ultravox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CallThrottlesUpdate", + methodName: "CallThrottlesUpdateAsync", + pathTemplate: "$\"/api/call_throttles/{throttleId}\"", + httpMethod: "PUT", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + 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); + ProcessCallThrottlesUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.CallThrottle.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Ultravox.CallThrottle.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Ultravox.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(); + } + } + /// + /// Updates a call throttle (full replacement). + /// + /// + /// + /// + /// 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 CallThrottlesUpdateAsync( + global::System.Guid throttleId, + string name, + global::System.Collections.Generic.IList rules, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ultravox.CallThrottle + { + Name = name, + Rules = rules, + }; + + return await CallThrottlesUpdateAsync( + throttleId: throttleId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.g.cs new file mode 100644 index 0000000..38e87e7 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.CallThrottlesClient.g.cs @@ -0,0 +1,115 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// 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 CallThrottlesClient : global::Ultravox.ICallThrottlesClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.ultravox.ai/"; + + 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::Ultravox.AutoSDKClientOptions Options { get; } + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ultravox.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the CallThrottlesClient. + /// 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 CallThrottlesClient( + 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 CallThrottlesClient. + /// 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 CallThrottlesClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + global::Ultravox.AutoSDKClientOptions? options = null, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Ultravox.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/Ultravox/Generated/Ultravox.CallsClient.CallsCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.CallsClient.CallsCreate.g.cs index fe4cb95..d58497a 100644 --- a/src/libs/Ultravox/Generated/Ultravox.CallsClient.CallsCreate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.CallsClient.CallsCreate.g.cs @@ -29,12 +29,14 @@ partial void PrepareCallsCreateArguments( global::System.Net.Http.HttpClient httpClient, ref bool? enableGreetingPrompt, ref global::System.Guid? priorCallId, + ref string? throttle, global::Ultravox.UltravoxV1StartCallRequest request); partial void PrepareCallsCreateRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, bool? enableGreetingPrompt, global::System.Guid? priorCallId, + string? throttle, global::Ultravox.UltravoxV1StartCallRequest request); partial void ProcessCallsCreateResponse( global::System.Net.Http.HttpClient httpClient, @@ -52,6 +54,7 @@ partial void ProcessCallsCreateResponseContent( /// Default Value: true /// /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -61,6 +64,7 @@ partial void ProcessCallsCreateResponseContent( global::Ultravox.UltravoxV1StartCallRequest request, bool? enableGreetingPrompt = default, global::System.Guid? priorCallId = default, + string? throttle = default, global::Ultravox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +76,7 @@ partial void ProcessCallsCreateResponseContent( httpClient: HttpClient, enableGreetingPrompt: ref enableGreetingPrompt, priorCallId: ref priorCallId, + throttle: ref throttle, request: request); @@ -101,7 +106,8 @@ partial void ProcessCallsCreateResponseContent( baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("enableGreetingPrompt", enableGreetingPrompt?.ToString().ToLowerInvariant()) - .AddOptionalParameter("priorCallId", priorCallId?.ToString()) + .AddOptionalParameter("priorCallId", priorCallId?.ToString()) + .AddOptionalParameter("throttle", throttle) ; var __path = __pathBuilder.ToString(); __path = global::Ultravox.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -151,6 +157,7 @@ partial void ProcessCallsCreateResponseContent( httpRequestMessage: __httpRequest, enableGreetingPrompt: enableGreetingPrompt, priorCallId: priorCallId, + throttle: throttle, request: request); return __httpRequest; @@ -411,6 +418,7 @@ partial void ProcessCallsCreateResponseContent( /// Default Value: true /// /// + /// /// /// The system prompt provided to the model during generations. /// @@ -515,6 +523,7 @@ partial void ProcessCallsCreateResponseContent( public async global::System.Threading.Tasks.Task CallsCreateAsync( bool? enableGreetingPrompt = default, global::System.Guid? priorCallId = default, + string? throttle = default, string? systemPrompt = default, float? temperature = default, string? model = default, @@ -579,6 +588,7 @@ partial void ProcessCallsCreateResponseContent( return await CallsCreateAsync( enableGreetingPrompt: enableGreetingPrompt, priorCallId: priorCallId, + throttle: throttle, request: __request, requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsCallsCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsCallsCreate.g.cs index 5fe5eae..8c12e8e 100644 --- a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsCallsCreate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsCallsCreate.g.cs @@ -8,6 +8,7 @@ public partial interface IAgentsClient /// /// /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -16,12 +17,14 @@ public partial interface IAgentsClient global::System.Guid agentId, global::Ultravox.UltravoxV1StartAgentCallRequest request, + string? throttle = default, global::Ultravox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// /// /// + /// /// /// Context for filling any mustache templates for the call. /// @@ -92,6 +95,7 @@ public partial interface IAgentsClient /// global::System.Threading.Tasks.Task AgentsCallsCreateAsync( global::System.Guid agentId, + string? throttle = default, object? templateContext = default, global::System.Collections.Generic.IList? initialMessages = default, global::System.Collections.Generic.Dictionary? metadata = default, diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesCreate.g.cs index d26b593..b17eebd 100644 --- a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesCreate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesCreate.g.cs @@ -28,6 +28,9 @@ public partial interface IAgentsClient /// /// The end of the time window during which calls can be made. /// + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -46,6 +49,7 @@ public partial interface IAgentsClient global::System.Collections.Generic.IList calls, global::System.DateTime? windowStart = default, global::System.DateTime? windowEnd = default, + string? throttle = default, string? webhookUrl = default, string? webhookSecret = default, bool? paused = default, diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs index 8574a37..41f7560 100644 --- a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsScheduledBatchesPartialUpdate.g.cs @@ -31,6 +31,9 @@ public partial interface IAgentsClient /// /// The end of the time window during which calls can be made. /// + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -50,6 +53,7 @@ public partial interface IAgentsClient global::System.Collections.Generic.IList calls, global::System.DateTime? windowStart = default, global::System.DateTime? windowEnd = default, + string? throttle = default, string? webhookUrl = default, string? webhookSecret = default, bool? paused = default, diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesCreate.g.cs new file mode 100644 index 0000000..a985b90 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesCreate.g.cs @@ -0,0 +1,33 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface ICallThrottlesClient + { + /// + /// Creates a new call throttle. + /// + /// + /// 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 CallThrottlesCreateAsync( + + global::Ultravox.CallThrottle request, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new call throttle. + /// + /// + /// + /// 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 CallThrottlesCreateAsync( + string name, + global::System.Collections.Generic.IList rules, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesDestroy.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesDestroy.g.cs new file mode 100644 index 0000000..51f041a --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesDestroy.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface ICallThrottlesClient + { + /// + /// Deletes a call throttle. + /// + /// + /// 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 CallThrottlesDestroyAsync( + global::System.Guid throttleId, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesList.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesList.g.cs new file mode 100644 index 0000000..8fece85 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesList.g.cs @@ -0,0 +1,21 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface ICallThrottlesClient + { + /// + /// Lists call throttles for the current account. + /// + /// + /// + /// 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 CallThrottlesListAsync( + string? cursor = default, + int? pageSize = default, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesPartialUpdate.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesPartialUpdate.g.cs new file mode 100644 index 0000000..8fa8730 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesPartialUpdate.g.cs @@ -0,0 +1,37 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface ICallThrottlesClient + { + /// + /// Partially updates a call throttle. + /// + /// + /// + /// 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 CallThrottlesPartialUpdateAsync( + global::System.Guid throttleId, + + global::Ultravox.PatchedCallThrottle request, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Partially updates a call throttle. + /// + /// + /// + /// + /// 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 CallThrottlesPartialUpdateAsync( + global::System.Guid throttleId, + string? name = default, + global::System.Collections.Generic.IList? rules = default, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesRetrieve.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesRetrieve.g.cs new file mode 100644 index 0000000..5bc4dc4 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesRetrieve.g.cs @@ -0,0 +1,19 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface ICallThrottlesClient + { + /// + /// Gets a call throttle. + /// + /// + /// 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 CallThrottlesRetrieveAsync( + global::System.Guid throttleId, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesUpdate.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesUpdate.g.cs new file mode 100644 index 0000000..3fa40fc --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.CallThrottlesUpdate.g.cs @@ -0,0 +1,37 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface ICallThrottlesClient + { + /// + /// Updates a call throttle (full replacement). + /// + /// + /// + /// 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 CallThrottlesUpdateAsync( + global::System.Guid throttleId, + + global::Ultravox.CallThrottle request, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates a call throttle (full replacement). + /// + /// + /// + /// + /// 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 CallThrottlesUpdateAsync( + global::System.Guid throttleId, + string name, + global::System.Collections.Generic.IList rules, + global::Ultravox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.g.cs new file mode 100644 index 0000000..ef8ed8b --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.ICallThrottlesClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// 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 ICallThrottlesClient : 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::Ultravox.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.ICallsClient.CallsCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.ICallsClient.CallsCreate.g.cs index 1612775..dac5754 100644 --- a/src/libs/Ultravox/Generated/Ultravox.ICallsClient.CallsCreate.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.ICallsClient.CallsCreate.g.cs @@ -11,6 +11,7 @@ public partial interface ICallsClient /// Default Value: true /// /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -20,6 +21,7 @@ public partial interface ICallsClient global::Ultravox.UltravoxV1StartCallRequest request, bool? enableGreetingPrompt = default, global::System.Guid? priorCallId = default, + string? throttle = default, global::Ultravox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// @@ -29,6 +31,7 @@ public partial interface ICallsClient /// Default Value: true /// /// + /// /// /// The system prompt provided to the model during generations. /// @@ -133,6 +136,7 @@ public partial interface ICallsClient global::System.Threading.Tasks.Task CallsCreateAsync( bool? enableGreetingPrompt = default, global::System.Guid? priorCallId = default, + string? throttle = default, string? systemPrompt = default, float? temperature = default, string? model = default, diff --git a/src/libs/Ultravox/Generated/Ultravox.IUltravoxClient.g.cs b/src/libs/Ultravox/Generated/Ultravox.IUltravoxClient.g.cs index 58b1db5..09400bc 100644 --- a/src/libs/Ultravox/Generated/Ultravox.IUltravoxClient.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.IUltravoxClient.g.cs @@ -60,6 +60,11 @@ public partial interface IUltravoxClient : global::System.IDisposable /// public ApiKeysClient ApiKeys { get; } + /// + /// + /// + public CallThrottlesClient CallThrottles { get; } + /// /// /// diff --git a/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContext.g.cs b/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContext.g.cs index 9e4c39a..0640e80 100644 --- a/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContext.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContext.g.cs @@ -265,6 +265,9 @@ namespace Ultravox [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.TerminationReasonEnum), TypeInfoPropertyName = "TerminationReasonEnum2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.CallStage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.CallStatistics))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.CallThrottle))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.CallThrottleRule))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.CallTombstone))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.CallTool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1CallTool))] @@ -293,6 +296,8 @@ namespace Ultravox [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PaginatedCallStageList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PaginatedCallThrottleList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PaginatedCallTombstoneList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PaginatedInvoiceList))] @@ -335,6 +340,7 @@ namespace Ultravox [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PatchedAPIKey))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PatchedAccountTelephonyConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PatchedAgent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PatchedCallThrottle))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PatchedPlivoConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.PatchedScheduledCallBatch))] @@ -473,6 +479,7 @@ namespace Ultravox [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [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))] @@ -481,6 +488,7 @@ namespace Ultravox [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] diff --git a/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs b/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs index 9b62b11..cd9fd71 100644 --- a/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs @@ -240,827 +240,851 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Ultravox.CallTombstone? Type53 { get; set; } + public global::Ultravox.CallThrottle? Type53 { get; set; } /// /// /// - public global::Ultravox.CallTool? Type54 { get; set; } + public global::System.Collections.Generic.IList? Type54 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallTool? Type55 { get; set; } + public global::Ultravox.CallThrottleRule? Type55 { get; set; } /// /// /// - public global::Ultravox.CallUsage? Type56 { get; set; } + public global::Ultravox.CallTombstone? Type56 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type57 { get; set; } + public global::Ultravox.CallTool? Type57 { get; set; } /// /// /// - public global::Ultravox.DailyCallStatistics? Type58 { get; set; } + public global::Ultravox.UltravoxV1CallTool? Type58 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type59 { get; set; } + public global::Ultravox.CallUsage? Type59 { get; set; } /// /// /// - public global::Ultravox.HourlyCallStatistics? Type60 { get; set; } + public global::System.Collections.Generic.IList? Type60 { get; set; } /// /// /// - public global::Ultravox.ConcurrencyBucket? Type61 { get; set; } + public global::Ultravox.DailyCallStatistics? Type61 { get; set; } /// /// /// - public global::Ultravox.ConcurrencyResponse? Type62 { get; set; } + public global::System.Collections.Generic.IList? Type62 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type63 { get; set; } + public global::Ultravox.HourlyCallStatistics? Type63 { get; set; } /// /// /// - public global::Ultravox.CorpusUploadsRequest? Type64 { get; set; } + public global::Ultravox.ConcurrencyBucket? Type64 { get; set; } /// /// /// - public global::Ultravox.CorpusUploadsResponse? Type65 { get; set; } + public global::Ultravox.ConcurrencyResponse? Type65 { get; set; } /// /// /// - public global::Ultravox.EventsEnum? Type66 { get; set; } + public global::System.Collections.Generic.IList? Type66 { get; set; } /// /// /// - public global::Ultravox.Invoice? Type67 { get; set; } + public global::Ultravox.CorpusUploadsRequest? Type67 { get; set; } /// /// /// - public global::Ultravox.InvoiceStatusEnum? Type68 { get; set; } + public global::Ultravox.CorpusUploadsResponse? Type68 { get; set; } /// /// /// - public global::Ultravox.ModelAlias? Type69 { get; set; } + public global::Ultravox.EventsEnum? Type69 { get; set; } /// /// /// - public global::Ultravox.OwnershipEnum? Type70 { get; set; } + public global::Ultravox.Invoice? Type70 { get; set; } /// /// /// - public global::Ultravox.PaginatedAPIKeyList? Type71 { get; set; } + public global::Ultravox.InvoiceStatusEnum? Type71 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type72 { get; set; } + public global::Ultravox.ModelAlias? Type72 { get; set; } /// /// /// - public global::Ultravox.PaginatedAgentList? Type73 { get; set; } + public global::Ultravox.OwnershipEnum? Type73 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type74 { get; set; } + public global::Ultravox.PaginatedAPIKeyList? Type74 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallEventList? Type75 { get; set; } + public global::System.Collections.Generic.IList? Type75 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type76 { get; set; } + public global::Ultravox.PaginatedAgentList? Type76 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallList? Type77 { get; set; } + public global::System.Collections.Generic.IList? Type77 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type78 { get; set; } + public global::Ultravox.PaginatedCallEventList? Type78 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallStageList? Type79 { get; set; } + public global::System.Collections.Generic.IList? Type79 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type80 { get; set; } + public global::Ultravox.PaginatedCallList? Type80 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallTombstoneList? Type81 { get; set; } + public global::System.Collections.Generic.IList? Type81 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type82 { get; set; } + public global::Ultravox.PaginatedCallStageList? Type82 { get; set; } /// /// /// - public global::Ultravox.PaginatedInvoiceList? Type83 { get; set; } + public global::System.Collections.Generic.IList? Type83 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type84 { get; set; } + public global::Ultravox.PaginatedCallThrottleList? Type84 { get; set; } /// /// /// - public global::Ultravox.PaginatedModelAliasList? Type85 { get; set; } + public global::System.Collections.Generic.IList? Type85 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type86 { get; set; } + public global::Ultravox.PaginatedCallTombstoneList? Type86 { get; set; } /// /// /// - public global::Ultravox.PaginatedScheduledCallBatchList? Type87 { get; set; } + public global::System.Collections.Generic.IList? Type87 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type88 { get; set; } + public global::Ultravox.PaginatedInvoiceList? Type88 { get; set; } /// /// /// - public global::Ultravox.ScheduledCallBatch? Type89 { get; set; } + public global::System.Collections.Generic.IList? Type89 { get; set; } /// /// /// - public global::Ultravox.PaginatedScheduledCallList? Type90 { get; set; } + public global::Ultravox.PaginatedModelAliasList? Type90 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type91 { get; set; } + public global::System.Collections.Generic.IList? Type91 { get; set; } /// /// /// - public global::Ultravox.ScheduledCall? Type92 { get; set; } + public global::Ultravox.PaginatedScheduledCallBatchList? Type92 { get; set; } /// /// /// - public global::Ultravox.PaginatedSipRegistrationList? Type93 { get; set; } + public global::System.Collections.Generic.IList? Type93 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type94 { get; set; } + public global::Ultravox.ScheduledCallBatch? Type94 { get; set; } /// /// /// - public global::Ultravox.SipRegistration? Type95 { get; set; } + public global::Ultravox.PaginatedScheduledCallList? Type95 { get; set; } /// /// /// - public global::Ultravox.PaginatedToolHistoryList? Type96 { get; set; } + public global::System.Collections.Generic.IList? Type96 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::Ultravox.ScheduledCall? Type97 { get; set; } /// /// /// - public global::Ultravox.ToolHistory? Type98 { get; set; } + public global::Ultravox.PaginatedSipRegistrationList? Type98 { get; set; } /// /// /// - public global::Ultravox.PaginatedToolList? Type99 { get; set; } + public global::System.Collections.Generic.IList? Type99 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type100 { get; set; } + public global::Ultravox.SipRegistration? Type100 { get; set; } /// /// /// - public global::Ultravox.Tool? Type101 { get; set; } + public global::Ultravox.PaginatedToolHistoryList? Type101 { get; set; } /// /// /// - public global::Ultravox.PaginatedVoiceList? Type102 { get; set; } + public global::System.Collections.Generic.IList? Type102 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type103 { get; set; } + public global::Ultravox.ToolHistory? Type103 { get; set; } /// /// /// - public global::Ultravox.Voice? Type104 { get; set; } + public global::Ultravox.PaginatedToolList? Type104 { get; set; } /// /// /// - public global::Ultravox.PaginatedWebhookList? Type105 { get; set; } + public global::System.Collections.Generic.IList? Type105 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type106 { get; set; } + public global::Ultravox.Tool? Type106 { get; set; } /// /// /// - public global::Ultravox.Webhook? Type107 { get; set; } + public global::Ultravox.PaginatedVoiceList? Type107 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1CorpusDocumentList? Type108 { get; set; } + public global::System.Collections.Generic.IList? Type108 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type109 { get; set; } + public global::Ultravox.Voice? Type109 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusDocument? Type110 { get; set; } + public global::Ultravox.PaginatedWebhookList? Type110 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1CorpusList? Type111 { get; set; } + public global::System.Collections.Generic.IList? Type111 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type112 { get; set; } + public global::Ultravox.Webhook? Type112 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1Corpus? Type113 { get; set; } + public global::Ultravox.PaginatedultravoxV1CorpusDocumentList? Type113 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1CorpusSourceList? Type114 { get; set; } + public global::System.Collections.Generic.IList? Type114 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type115 { get; set; } + public global::Ultravox.UltravoxV1CorpusDocument? Type115 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusSource? Type116 { get; set; } + public global::Ultravox.PaginatedultravoxV1CorpusList? Type116 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1MessageList? Type117 { get; set; } + public global::System.Collections.Generic.IList? Type117 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type118 { get; set; } + public global::Ultravox.UltravoxV1Corpus? Type118 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1Message? Type119 { get; set; } + public global::Ultravox.PaginatedultravoxV1CorpusSourceList? Type119 { get; set; } /// /// /// - public global::Ultravox.PatchedAPIKey? Type120 { get; set; } + public global::System.Collections.Generic.IList? Type120 { get; set; } /// /// /// - public global::Ultravox.PatchedAccountTelephonyConfig? Type121 { get; set; } + public global::Ultravox.UltravoxV1CorpusSource? Type121 { get; set; } /// /// /// - public global::Ultravox.PatchedAgent? Type122 { get; set; } + public global::Ultravox.PaginatedultravoxV1MessageList? Type122 { get; set; } /// /// /// - public global::Ultravox.PatchedPlivoConfig? Type123 { get; set; } + public global::System.Collections.Generic.IList? Type123 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type124 { get; set; } + public global::Ultravox.UltravoxV1Message? Type124 { get; set; } /// /// /// - public global::Ultravox.PatchedScheduledCallBatch? Type125 { get; set; } + public global::Ultravox.PatchedAPIKey? Type125 { get; set; } /// /// /// - public global::Ultravox.PatchedSetTtsApiKeysRequest? Type126 { get; set; } + public global::Ultravox.PatchedAccountTelephonyConfig? Type126 { get; set; } /// /// /// - public global::Ultravox.PatchedSipConfig? Type127 { get; set; } + public global::Ultravox.PatchedAgent? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::Ultravox.PatchedCallThrottle? Type128 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type129 { get; set; } + public global::Ultravox.PatchedPlivoConfig? Type129 { get; set; } /// /// /// - public global::Ultravox.PatchedSipRegistration? Type130 { get; set; } + public global::System.Collections.Generic.IList? Type130 { get; set; } /// /// /// - public global::Ultravox.PatchedTelnyxConfig? Type131 { get; set; } + public global::Ultravox.PatchedScheduledCallBatch? Type131 { get; set; } /// /// /// - public global::Ultravox.PatchedTwilioConfig? Type132 { get; set; } + public global::Ultravox.PatchedSetTtsApiKeysRequest? Type132 { get; set; } /// /// /// - public global::Ultravox.PatchedVoice? Type133 { get; set; } + public global::Ultravox.PatchedSipConfig? Type133 { get; set; } /// /// /// - public global::Ultravox.PatchedWebhook? Type134 { get; set; } + public global::System.Collections.Generic.IList? Type134 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type135 { get; set; } + public global::System.Collections.Generic.IList? Type135 { get; set; } /// /// /// - public global::Ultravox.WebhookStatusEnum? Type136 { get; set; } + public global::Ultravox.PatchedSipRegistration? Type136 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type137 { get; set; } + public global::Ultravox.PatchedTelnyxConfig? Type137 { get; set; } /// /// /// - public global::Ultravox.WebhookFailure? Type138 { get; set; } + public global::Ultravox.PatchedTwilioConfig? Type138 { get; set; } /// /// /// - public global::Ultravox.ScheduledCallStatusEnum? Type139 { get; set; } + public global::Ultravox.PatchedVoice? Type139 { get; set; } /// /// /// - public global::Ultravox.SendCallDataMessage? Type140 { get; set; } + public global::Ultravox.PatchedWebhook? Type140 { get; set; } /// /// /// - public global::Ultravox.SipConfig? Type141 { get; set; } + public global::System.Collections.Generic.IList? Type141 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1BaseToolDefinition? Type142 { get; set; } + public global::Ultravox.WebhookStatusEnum? Type142 { get; set; } /// /// /// - public global::Ultravox.UsageResponse? Type143 { get; set; } + public global::System.Collections.Generic.IList? Type143 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type144 { get; set; } + public global::Ultravox.WebhookFailure? Type144 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallTemplateInitialOutputMedium? Type145 { get; set; } + public global::Ultravox.ScheduledCallStatusEnum? Type145 { get; set; } /// /// /// - public float? Type146 { get; set; } + public global::Ultravox.SendCallDataMessage? Type146 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type147 { get; set; } + public global::Ultravox.SipConfig? Type147 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SelectedTool? Type148 { get; set; } + public global::Ultravox.UltravoxV1BaseToolDefinition? Type148 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallTemplateRetentionPolicy? Type149 { get; set; } + public global::Ultravox.UsageResponse? Type149 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusStats? Type150 { get; set; } + public global::System.Collections.Generic.IList? Type150 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusDocumentMetadata? Type151 { get; set; } + public global::Ultravox.UltravoxV1CallTemplateInitialOutputMedium? Type151 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusQueryResult? Type152 { get; set; } + public float? Type152 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusQueryResultCitation? Type153 { get; set; } + public global::System.Collections.Generic.IList? Type153 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SourceStats? Type154 { get; set; } + public global::Ultravox.UltravoxV1SelectedTool? Type154 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CrawlSpec? Type155 { get; set; } + public global::Ultravox.UltravoxV1CallTemplateRetentionPolicy? Type155 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1UploadSpec? Type156 { get; set; } + public global::Ultravox.UltravoxV1CorpusStats? Type156 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1AdvancedSpec? Type157 { get; set; } + public global::Ultravox.UltravoxV1CorpusDocumentMetadata? Type157 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MessageRole? Type158 { get; set; } + public global::Ultravox.UltravoxV1CorpusQueryResult? Type158 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MessageMedium? Type159 { get; set; } + public global::Ultravox.UltravoxV1CorpusQueryResultCitation? Type159 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1InCallTimespan? Type160 { get; set; } + public global::Ultravox.UltravoxV1SourceStats? Type160 { get; set; } /// /// /// - public global::Ultravox.GoogleProtobufValue? Type161 { get; set; } + public global::Ultravox.UltravoxV1CrawlSpec? Type161 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type162 { get; set; } + public global::Ultravox.UltravoxV1UploadSpec? Type162 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1AdvancedSpecDocumentDetails? Type163 { get; set; } + public global::Ultravox.UltravoxV1AdvancedSpec? Type163 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1AutomaticParameter? Type164 { get; set; } + public global::Ultravox.UltravoxV1MessageRole? Type164 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1AutomaticParameterLocation? Type165 { get; set; } + public global::Ultravox.UltravoxV1MessageMedium? Type165 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1AutomaticParameterKnownValue? Type166 { get; set; } + public global::Ultravox.UltravoxV1InCallTimespan? Type166 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1BaseClientToolDetails? Type167 { get; set; } + public global::Ultravox.GoogleProtobufValue? Type167 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1BaseDataConnectionToolDetails? Type168 { get; set; } + public global::System.Collections.Generic.IList? Type168 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1BaseHttpToolDetails? Type169 { get; set; } + public global::Ultravox.UltravoxV1AdvancedSpecDocumentDetails? Type169 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type170 { get; set; } + public global::Ultravox.UltravoxV1AutomaticParameter? Type170 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1DynamicParameter? Type171 { get; set; } + public global::Ultravox.UltravoxV1AutomaticParameterLocation? Type171 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type172 { get; set; } + public global::Ultravox.UltravoxV1AutomaticParameterKnownValue? Type172 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StaticParameter? Type173 { get; set; } + public global::Ultravox.UltravoxV1BaseClientToolDetails? Type173 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type174 { get; set; } + public global::Ultravox.UltravoxV1BaseDataConnectionToolDetails? Type174 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1ToolRequirements? Type175 { get; set; } + public global::Ultravox.UltravoxV1BaseHttpToolDetails? Type175 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1BaseToolDefinitionDefaultReaction? Type176 { get; set; } + public global::System.Collections.Generic.IList? Type176 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StaticToolResponse? Type177 { get; set; } + public global::Ultravox.UltravoxV1DynamicParameter? Type177 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumWebRtcMedium? Type178 { get; set; } + public global::System.Collections.Generic.IList? Type178 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumTwilioMedium? Type179 { get; set; } + public global::Ultravox.UltravoxV1StaticParameter? Type179 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumWebSocketMedium? Type180 { get; set; } + public global::System.Collections.Generic.IList? Type180 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumTelnyxMedium? Type181 { get; set; } + public global::Ultravox.UltravoxV1ToolRequirements? Type181 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumPlivoMedium? Type182 { get; set; } + public global::Ultravox.UltravoxV1BaseToolDefinitionDefaultReaction? Type182 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumExotelMedium? Type183 { get; set; } + public global::Ultravox.UltravoxV1StaticToolResponse? Type183 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumSipMedium? Type184 { get; set; } + public global::Ultravox.UltravoxV1CallMediumWebRtcMedium? Type184 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumDtmfHandling? Type185 { get; set; } + public global::Ultravox.UltravoxV1CallMediumTwilioMedium? Type185 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumDtmfUserTextMessage? Type186 { get; set; } + public global::Ultravox.UltravoxV1CallMediumWebSocketMedium? Type186 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallMediumDtmfUserTextMessageUrgency? Type187 { get; set; } + public global::Ultravox.UltravoxV1CallMediumTelnyxMedium? Type187 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1PlivoMediumOutgoingRequestParams? Type188 { get; set; } + public global::Ultravox.UltravoxV1CallMediumPlivoMedium? Type188 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SipMediumSipIncoming? Type189 { get; set; } + public global::Ultravox.UltravoxV1CallMediumExotelMedium? Type189 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SipMediumSipOutgoing? Type190 { get; set; } + public global::Ultravox.UltravoxV1CallMediumSipMedium? Type190 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1TelnyxMediumOutgoingRequestParams? Type191 { get; set; } + public global::Ultravox.UltravoxV1CallMediumDtmfHandling? Type191 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1TwilioMediumOutgoingRequestParams? Type192 { get; set; } + public global::Ultravox.UltravoxV1CallMediumDtmfUserTextMessage? Type192 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1EnabledDataMessages? Type193 { get; set; } + public global::Ultravox.UltravoxV1CallMediumDtmfUserTextMessageUrgency? Type193 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1HttpCallToolDetails? Type194 { get; set; } + public global::Ultravox.UltravoxV1PlivoMediumOutgoingRequestParams? Type194 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1ClientCallToolDetails? Type195 { get; set; } + public global::Ultravox.UltravoxV1SipMediumSipIncoming? Type195 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1DataConnectionCallToolDetails? Type196 { get; set; } + public global::Ultravox.UltravoxV1SipMediumSipOutgoing? Type196 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallToolDefaultReaction? Type197 { get; set; } + public global::Ultravox.UltravoxV1TelnyxMediumOutgoingRequestParams? Type197 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1Callback? Type198 { get; set; } + public global::Ultravox.UltravoxV1TwilioMediumOutgoingRequestParams? Type198 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CartesiaVoice? Type199 { get; set; } + public global::Ultravox.UltravoxV1EnabledDataMessages? Type199 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CartesiaVoiceCartesiaGenerationConfig? Type200 { get; set; } + public global::Ultravox.UltravoxV1HttpCallToolDetails? Type200 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusStatsStatus? Type201 { get; set; } + public global::Ultravox.UltravoxV1ClientCallToolDetails? Type201 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MimeTypeFilter? Type202 { get; set; } + public global::Ultravox.UltravoxV1DataConnectionCallToolDetails? Type202 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1DataConnectionAudioConfig? Type203 { get; set; } + public global::Ultravox.UltravoxV1CallToolDefaultReaction? Type203 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1DataConnectionAudioConfigChannelMode? Type204 { get; set; } + public global::Ultravox.UltravoxV1Callback? Type204 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1DynamicParameterLocation? Type205 { get; set; } + public global::Ultravox.UltravoxV1CartesiaVoice? Type205 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1ElevenLabsVoice? Type206 { get; set; } + public global::Ultravox.UltravoxV1CartesiaVoiceCartesiaGenerationConfig? Type206 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type207 { get; set; } + public global::Ultravox.UltravoxV1CorpusStatsStatus? Type207 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1ElevenLabsVoicePronunciationDictionaryReference? Type208 { get; set; } + public global::Ultravox.UltravoxV1MimeTypeFilter? Type208 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1LmntVoice? Type209 { get; set; } + public global::Ultravox.UltravoxV1DataConnectionAudioConfig? Type209 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1GoogleVoice? Type210 { get; set; } + public global::Ultravox.UltravoxV1DataConnectionAudioConfigChannelMode? Type210 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1InworldVoice? Type211 { get; set; } + public global::Ultravox.UltravoxV1DynamicParameterLocation? Type211 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1RespeecherVoice? Type212 { get; set; } + public global::Ultravox.UltravoxV1ElevenLabsVoice? Type212 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1GenericVoice? Type213 { get; set; } + public global::System.Collections.Generic.IList? Type213 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1FallbackAgentGreeting? Type214 { get; set; } + public global::Ultravox.UltravoxV1ElevenLabsVoicePronunciationDictionaryReference? Type214 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1FirstSpeakerSettingsUserGreeting? Type215 { get; set; } + public global::Ultravox.UltravoxV1LmntVoice? Type215 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1FirstSpeakerSettingsAgentGreeting? Type216 { get; set; } + public global::Ultravox.UltravoxV1GoogleVoice? Type216 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1GenericVoiceJsonByteEncoding? Type217 { get; set; } + public global::Ultravox.UltravoxV1InworldVoice? Type217 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1HeaderApiKeyRequirement? Type218 { get; set; } + public global::Ultravox.UltravoxV1RespeecherVoice? Type218 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1HttpAuthRequirement? Type219 { get; set; } + public global::Ultravox.UltravoxV1GenericVoice? Type219 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MimeTypeSet? Type220 { get; set; } + public global::Ultravox.UltravoxV1FallbackAgentGreeting? Type220 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1QueryApiKeyRequirement? Type221 { get; set; } + public global::Ultravox.UltravoxV1FirstSpeakerSettingsUserGreeting? Type221 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1QueryCorpusRequest? Type222 { get; set; } + public global::Ultravox.UltravoxV1FirstSpeakerSettingsAgentGreeting? Type222 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SecurityOptions? Type223 { get; set; } + public global::Ultravox.UltravoxV1GenericVoiceJsonByteEncoding? Type223 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type224 { get; set; } + public global::Ultravox.UltravoxV1HeaderApiKeyRequirement? Type224 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SecurityRequirements? Type225 { get; set; } + public global::Ultravox.UltravoxV1HttpAuthRequirement? Type225 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SecurityRequirement? Type226 { get; set; } + public global::Ultravox.UltravoxV1MimeTypeSet? Type226 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type227 { get; set; } + public global::Ultravox.UltravoxV1QueryApiKeyRequirement? Type227 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1UltravoxCallTokenRequirement? Type228 { get; set; } + public global::Ultravox.UltravoxV1QueryCorpusRequest? Type228 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SourceStatsStatus? Type229 { get; set; } + public global::Ultravox.UltravoxV1SecurityOptions? Type229 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartAgentCallRequest? Type230 { get; set; } + public global::System.Collections.Generic.IList? Type230 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartAgentCallRequestInitialOutputMedium? Type231 { get; set; } + public global::Ultravox.UltravoxV1SecurityRequirements? Type231 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1ToolOverrides? Type232 { get; set; } + public global::Ultravox.UltravoxV1SecurityRequirement? Type232 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartAgentCallRequestRetentionPolicy? Type233 { get; set; } + public global::System.Collections.Generic.Dictionary? Type233 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequest? Type234 { get; set; } + public global::Ultravox.UltravoxV1UltravoxCallTokenRequirement? Type234 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequestFirstSpeaker? Type235 { get; set; } + public global::Ultravox.UltravoxV1SourceStatsStatus? Type235 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequestInitialOutputMedium? Type236 { get; set; } + public global::Ultravox.UltravoxV1StartAgentCallRequest? Type236 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequestRetentionPolicy? Type237 { get; set; } + public global::Ultravox.UltravoxV1StartAgentCallRequestInitialOutputMedium? Type237 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StaticParameterLocation? Type238 { get; set; } + public global::Ultravox.UltravoxV1ToolOverrides? Type238 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1TimedMessageEndBehavior? Type239 { get; set; } + public global::Ultravox.UltravoxV1StartAgentCallRequestRetentionPolicy? Type239 { get; set; } /// /// /// - public global::Ultravox.ToolsCreateRequest? Type240 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequest? Type240 { get; set; } /// /// /// - public byte[]? Type241 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequestFirstSpeaker? Type241 { get; set; } /// /// /// - public global::Ultravox.VoicesCreateRequest? Type242 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequestInitialOutputMedium? Type242 { get; set; } /// /// /// - public global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket? Type243 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequestRetentionPolicy? Type243 { get; set; } /// /// /// - public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type244 { get; set; } + public global::Ultravox.UltravoxV1StaticParameterLocation? Type244 { get; set; } /// /// /// - public global::Ultravox.CallsEventsListMinimumSeverity? Type245 { get; set; } + public global::Ultravox.UltravoxV1TimedMessageEndBehavior? Type245 { get; set; } /// /// /// - public global::Ultravox.CallsMessagesListMode? Type246 { get; set; } + public global::Ultravox.ToolsCreateRequest? Type246 { get; set; } /// /// /// - public global::Ultravox.SchemaRetrieveFormat? Type247 { get; set; } + public byte[]? Type247 { get; set; } /// /// /// - public global::Ultravox.SchemaRetrieveLang? Type248 { get; set; } + public global::Ultravox.VoicesCreateRequest? Type248 { get; set; } /// /// /// - public global::Ultravox.ToolsListOwnership? Type249 { get; set; } + public global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket? Type249 { get; set; } /// /// /// - public global::Ultravox.ToolsListSortOrder? Type250 { get; set; } + public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type250 { get; set; } /// /// /// - public global::Ultravox.VoicesListBillingStyle? Type251 { get; set; } + public global::Ultravox.CallsEventsListMinimumSeverity? Type251 { get; set; } /// /// /// - public global::Ultravox.VoicesListOwnership? Type252 { get; set; } + public global::Ultravox.CallsMessagesListMode? Type252 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type253 { get; set; } + public global::Ultravox.SchemaRetrieveFormat? Type253 { get; set; } /// /// /// - public global::Ultravox.VoicesListProviderItem? Type254 { get; set; } + public global::Ultravox.SchemaRetrieveLang? Type254 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type255 { get; set; } + public global::Ultravox.ToolsListOwnership? Type255 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type256 { get; set; } + public global::Ultravox.ToolsListSortOrder? Type256 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type257 { get; set; } + public global::Ultravox.VoicesListBillingStyle? Type257 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type258 { get; set; } + public global::Ultravox.VoicesListOwnership? Type258 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type259 { get; set; } + /// + /// + /// + public global::Ultravox.VoicesListProviderItem? Type260 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type261 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type262 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type263 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type264 { get; set; } /// /// @@ -1073,162 +1097,170 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType2 { get; set; } + public global::System.Collections.Generic.List? ListType2 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType3 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType4 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType3 { get; set; } + public global::System.Collections.Generic.List? ListType5 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType4 { get; set; } + public global::System.Collections.Generic.List? ListType6 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType5 { get; set; } + public global::System.Collections.Generic.List? ListType7 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType6 { get; set; } + public global::System.Collections.Generic.List? ListType8 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType7 { get; set; } + public global::System.Collections.Generic.List? ListType9 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType8 { get; set; } + public global::System.Collections.Generic.List? ListType10 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType9 { get; set; } + public global::System.Collections.Generic.List? ListType11 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType10 { get; set; } + public global::System.Collections.Generic.List? ListType12 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType11 { get; set; } + public global::System.Collections.Generic.List? ListType13 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType12 { get; set; } + public global::System.Collections.Generic.List? ListType14 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType13 { get; set; } + public global::System.Collections.Generic.List? ListType15 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType14 { get; set; } + public global::System.Collections.Generic.List? ListType16 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType15 { get; set; } + public global::System.Collections.Generic.List? ListType17 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType16 { get; set; } + public global::System.Collections.Generic.List? ListType18 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType17 { get; set; } + public global::System.Collections.Generic.List? ListType19 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType18 { get; set; } + public global::System.Collections.Generic.List? ListType20 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType19 { get; set; } + public global::System.Collections.Generic.List? ListType21 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType20 { get; set; } + public global::System.Collections.Generic.List? ListType22 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType21 { get; set; } + public global::System.Collections.Generic.List? ListType23 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType22 { get; set; } + public global::System.Collections.Generic.List? ListType24 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType23 { get; set; } + public global::System.Collections.Generic.List? ListType25 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType24 { get; set; } + public global::System.Collections.Generic.List? ListType26 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType25 { get; set; } + public global::System.Collections.Generic.List? ListType27 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType26 { get; set; } + public global::System.Collections.Generic.List? ListType28 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType27 { get; set; } + public global::System.Collections.Generic.List? ListType29 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType28 { get; set; } + public global::System.Collections.Generic.List? ListType30 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType29 { get; set; } + public global::System.Collections.Generic.List? ListType31 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType30 { get; set; } + public global::System.Collections.Generic.List? ListType32 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType31 { get; set; } + public global::System.Collections.Generic.List? ListType33 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType32 { get; set; } + public global::System.Collections.Generic.List? ListType34 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType33 { get; set; } + public global::System.Collections.Generic.List? ListType35 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType34 { get; set; } + public global::System.Collections.Generic.List? ListType36 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType35 { get; set; } + public global::System.Collections.Generic.List? ListType37 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType36 { get; set; } + public global::System.Collections.Generic.List? ListType38 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType37 { get; set; } + public global::System.Collections.Generic.List? ListType39 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType38 { get; set; } + public global::System.Collections.Generic.List? ListType40 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType39 { get; set; } + public global::System.Collections.Generic.List? ListType41 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType40 { get; set; } + public global::System.Collections.Generic.List? ListType42 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType41 { get; set; } + public global::System.Collections.Generic.List? ListType43 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottle.Json.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottle.Json.g.cs new file mode 100644 index 0000000..7a7e0da --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottle.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ultravox +{ + public sealed partial class CallThrottle + { + /// + /// 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::Ultravox.CallThrottle? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ultravox.CallThrottle), + jsonSerializerContext) as global::Ultravox.CallThrottle; + } + + /// + /// 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::Ultravox.CallThrottle? 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::Ultravox.CallThrottle), + jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.CallThrottle; + } + + /// + /// 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/Ultravox/Generated/Ultravox.Models.CallThrottle.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottle.g.cs new file mode 100644 index 0000000..051ef63 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottle.g.cs @@ -0,0 +1,78 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// + /// + public sealed partial class CallThrottle + { + /// + /// Included only in responses + /// + /// default! + [global::System.Text.Json.Serialization.JsonPropertyName("throttleId")] + public global::System.Guid ThrottleId { get; set; } = default!; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Included only in responses + /// + /// default! + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + public global::System.DateTime Created { get; set; } = default!; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rules")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Rules { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// Included only in responses + /// + /// + /// Included only in responses + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CallThrottle( + string name, + global::System.Collections.Generic.IList rules, + global::System.Guid throttleId = default!, + global::System.DateTime created = default!) + { + this.ThrottleId = throttleId; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Created = created; + this.Rules = rules ?? throw new global::System.ArgumentNullException(nameof(rules)); + } + + /// + /// Initializes a new instance of the class. + /// + public CallThrottle() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottleRule.Json.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottleRule.Json.g.cs new file mode 100644 index 0000000..e99b0c0 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottleRule.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ultravox +{ + public sealed partial class CallThrottleRule + { + /// + /// 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::Ultravox.CallThrottleRule? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ultravox.CallThrottleRule), + jsonSerializerContext) as global::Ultravox.CallThrottleRule; + } + + /// + /// 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::Ultravox.CallThrottleRule? 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::Ultravox.CallThrottleRule), + jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.CallThrottleRule; + } + + /// + /// 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/Ultravox/Generated/Ultravox.Models.CallThrottleRule.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottleRule.g.cs new file mode 100644 index 0000000..57afefe --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.CallThrottleRule.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// + /// + public sealed partial class CallThrottleRule + { + /// + /// Maximum number of calls allowed in the time window (max 100). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxCalls")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxCalls { get; set; } + + /// + /// Duration of the sliding time window in seconds (max 86,400). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("windowSeconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int WindowSeconds { 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. + /// + /// + /// Maximum number of calls allowed in the time window (max 100). + /// + /// + /// Duration of the sliding time window in seconds (max 86,400). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CallThrottleRule( + int maxCalls, + int windowSeconds) + { + this.MaxCalls = maxCalls; + this.WindowSeconds = windowSeconds; + } + + /// + /// Initializes a new instance of the class. + /// + public CallThrottleRule() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedCallThrottleList.Json.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedCallThrottleList.Json.g.cs new file mode 100644 index 0000000..80ed76d --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedCallThrottleList.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ultravox +{ + public sealed partial class PaginatedCallThrottleList + { + /// + /// 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::Ultravox.PaginatedCallThrottleList? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ultravox.PaginatedCallThrottleList), + jsonSerializerContext) as global::Ultravox.PaginatedCallThrottleList; + } + + /// + /// 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::Ultravox.PaginatedCallThrottleList? 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::Ultravox.PaginatedCallThrottleList), + jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.PaginatedCallThrottleList; + } + + /// + /// 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/Ultravox/Generated/Ultravox.Models.PaginatedCallThrottleList.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedCallThrottleList.g.cs new file mode 100644 index 0000000..e8e1424 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedCallThrottleList.g.cs @@ -0,0 +1,80 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// + /// + public sealed partial class PaginatedCallThrottleList + { + /// + /// Example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + /// + /// http://api.example.org/accounts/?cursor=cD00ODY%3D" + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + public string? Next { get; set; } + + /// + /// Example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + /// + /// http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + [global::System.Text.Json.Serialization.JsonPropertyName("previous")] + public string? Previous { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("results")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Results { get; set; } + + /// + /// Example: 123 + /// + /// 123 + [global::System.Text.Json.Serialization.JsonPropertyName("total")] + public int? Total { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + /// + /// + /// Example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + /// + /// + /// Example: 123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PaginatedCallThrottleList( + global::System.Collections.Generic.IList results, + string? next, + string? previous, + int? total) + { + this.Next = next; + this.Previous = previous; + this.Results = results ?? throw new global::System.ArgumentNullException(nameof(results)); + this.Total = total; + } + + /// + /// Initializes a new instance of the class. + /// + public PaginatedCallThrottleList() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.PatchedCallThrottle.Json.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedCallThrottle.Json.g.cs new file mode 100644 index 0000000..2aecbc8 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedCallThrottle.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ultravox +{ + public sealed partial class PatchedCallThrottle + { + /// + /// 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::Ultravox.PatchedCallThrottle? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ultravox.PatchedCallThrottle), + jsonSerializerContext) as global::Ultravox.PatchedCallThrottle; + } + + /// + /// 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::Ultravox.PatchedCallThrottle? 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::Ultravox.PatchedCallThrottle), + jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.PatchedCallThrottle; + } + + /// + /// 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/Ultravox/Generated/Ultravox.Models.PatchedCallThrottle.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedCallThrottle.g.cs new file mode 100644 index 0000000..2037f8b --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedCallThrottle.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// + /// + public sealed partial class PatchedCallThrottle + { + /// + /// Included only in responses + /// + [global::System.Text.Json.Serialization.JsonPropertyName("throttleId")] + public global::System.Guid? ThrottleId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Included only in responses + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + public global::System.DateTime? Created { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rules")] + public global::System.Collections.Generic.IList? Rules { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Included only in responses + /// + /// + /// + /// Included only in responses + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PatchedCallThrottle( + global::System.Guid? throttleId, + string? name, + global::System.DateTime? created, + global::System.Collections.Generic.IList? rules) + { + this.ThrottleId = throttleId; + this.Name = name; + this.Created = created; + this.Rules = rules; + } + + /// + /// Initializes a new instance of the class. + /// + public PatchedCallThrottle() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.PatchedScheduledCallBatch.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedScheduledCallBatch.g.cs index 6a9c433..1abd292 100644 --- a/src/libs/Ultravox/Generated/Ultravox.Models.PatchedScheduledCallBatch.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedScheduledCallBatch.g.cs @@ -32,6 +32,12 @@ public sealed partial class PatchedScheduledCallBatch [global::System.Text.Json.Serialization.JsonPropertyName("windowEnd")] public global::System.DateTime? WindowEnd { get; set; } + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("throttle")] + public string? Throttle { get; set; } + /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -97,6 +103,9 @@ public sealed partial class PatchedScheduledCallBatch /// /// The end of the time window during which calls can be made. /// + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -126,6 +135,7 @@ public PatchedScheduledCallBatch( global::System.DateTime? created, global::System.DateTime? windowStart, global::System.DateTime? windowEnd, + string? throttle, string? webhookUrl, string? webhookSecret, bool? paused, @@ -138,6 +148,7 @@ public PatchedScheduledCallBatch( this.Created = created; this.WindowStart = windowStart; this.WindowEnd = windowEnd; + this.Throttle = throttle; this.WebhookUrl = webhookUrl; this.WebhookSecret = webhookSecret; this.Paused = paused; diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.ScheduledCallBatch.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.ScheduledCallBatch.g.cs index 3208c77..d37a7ca 100644 --- a/src/libs/Ultravox/Generated/Ultravox.Models.ScheduledCallBatch.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.Models.ScheduledCallBatch.g.cs @@ -34,6 +34,12 @@ public sealed partial class ScheduledCallBatch [global::System.Text.Json.Serialization.JsonPropertyName("windowEnd")] public global::System.DateTime? WindowEnd { get; set; } + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("throttle")] + public string? Throttle { get; set; } + /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -95,6 +101,9 @@ public sealed partial class ScheduledCallBatch /// /// The end of the time window during which calls can be made. /// + /// + /// The name or ID of a call throttle. If specified, calls in this batch will be subject to the rate limits defined by the throttle. + /// /// /// The URL to which a request will be made (synchronously) when a call in the batch is created, excluding those with an outgoing medium. Required if any call has a non-outgoing medium and not allowed otherwise. /// @@ -128,6 +137,7 @@ public sealed partial class ScheduledCallBatch public ScheduledCallBatch( global::System.DateTime? windowStart, global::System.DateTime? windowEnd, + string? throttle, string? webhookUrl, string? webhookSecret, bool? paused, @@ -142,6 +152,7 @@ public ScheduledCallBatch( this.Created = created; this.WindowStart = windowStart; this.WindowEnd = windowEnd; + this.Throttle = throttle; this.WebhookUrl = webhookUrl; this.WebhookSecret = webhookSecret; this.Paused = paused; diff --git a/src/libs/Ultravox/Generated/Ultravox.UltravoxClient.g.cs b/src/libs/Ultravox/Generated/Ultravox.UltravoxClient.g.cs index 00893fa..a421e1b 100644 --- a/src/libs/Ultravox/Generated/Ultravox.UltravoxClient.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.UltravoxClient.g.cs @@ -67,6 +67,15 @@ public sealed partial class UltravoxClient : global::Ultravox.IUltravoxClient, g JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public CallThrottlesClient CallThrottles => new CallThrottlesClient(HttpClient, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// diff --git a/src/libs/Ultravox/openapi.yaml b/src/libs/Ultravox/openapi.yaml index 88f3b76..78162ee 100644 --- a/src/libs/Ultravox/openapi.yaml +++ b/src/libs/Ultravox/openapi.yaml @@ -470,6 +470,14 @@ paths: type: string format: uuid required: true + - in: query + name: throttle + schema: + type: string + minLength: 1 + description: The name or ID of a call throttle to apply to this call. If the + throttle's rate limits have been exceeded, the call will be rejected with + a 429 status. tags: - agents requestBody: @@ -959,6 +967,146 @@ paths: responses: '204': description: No response body + /api/call_throttles: + get: + operationId: call_throttles_list + description: Lists call throttles for the current account. + parameters: + - name: cursor + required: false + in: query + description: The pagination cursor value. + schema: + type: string + - name: pageSize + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - call_throttles + security: + - apiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCallThrottleList' + description: '' + post: + operationId: call_throttles_create + description: Creates a new call throttle. + tags: + - call_throttles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CallThrottle' + required: true + security: + - apiKeyAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CallThrottle' + description: '' + /api/call_throttles/{throttle_id}: + get: + operationId: call_throttles_retrieve + description: Gets a call throttle. + parameters: + - in: path + name: throttle_id + schema: + type: string + format: uuid + required: true + tags: + - call_throttles + security: + - apiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CallThrottle' + description: '' + put: + operationId: call_throttles_update + description: Updates a call throttle (full replacement). + parameters: + - in: path + name: throttle_id + schema: + type: string + format: uuid + required: true + tags: + - call_throttles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CallThrottle' + required: true + security: + - apiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CallThrottle' + description: '' + patch: + operationId: call_throttles_partial_update + description: Partially updates a call throttle. + parameters: + - in: path + name: throttle_id + schema: + type: string + format: uuid + required: true + tags: + - call_throttles + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCallThrottle' + security: + - apiKeyAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CallThrottle' + description: '' + delete: + operationId: call_throttles_destroy + description: Deletes a call throttle. + parameters: + - in: path + name: throttle_id + schema: + type: string + format: uuid + required: true + tags: + - call_throttles + security: + - apiKeyAuth: [] + responses: + '204': + description: No response body /api/calls: get: operationId: calls_list @@ -1081,6 +1229,14 @@ paths: body. The new call will also use the prior call's message history as its own initial_messages. (It's illegal to also set initial_messages in the body.) + - in: query + name: throttle + schema: + type: string + minLength: 1 + description: The name or ID of a call throttle to apply to this call. If the + throttle's rate limits have been exceeded, the call will be rejected with + a 429 status. tags: - calls requestBody: @@ -3958,6 +4114,45 @@ components: - errorCount - joinedCount - totalCount + CallThrottle: + type: object + properties: + throttleId: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 64 + created: + type: string + format: date-time + readOnly: true + rules: + type: array + items: + $ref: '#/components/schemas/CallThrottleRule' + required: + - created + - name + - rules + - throttleId + CallThrottleRule: + type: object + properties: + maxCalls: + type: integer + maximum: 100 + minimum: 1 + description: Maximum number of calls allowed in the time window (max 100). + windowSeconds: + type: integer + maximum: 86400 + minimum: 1 + description: Duration of the sliding time window in seconds (max 86,400). + required: + - maxCalls + - windowSeconds CallTombstone: type: object properties: @@ -4398,6 +4593,28 @@ components: total: type: integer example: 123 + PaginatedCallThrottleList: + type: object + required: + - results + properties: + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + results: + type: array + items: + $ref: '#/components/schemas/CallThrottle' + total: + type: integer + example: 123 PaginatedCallTombstoneList: type: object required: @@ -4780,6 +4997,24 @@ components: allOf: - $ref: '#/components/schemas/AgentStatistics' readOnly: true + PatchedCallThrottle: + type: object + properties: + throttleId: + type: string + format: uuid + readOnly: true + name: + type: string + maxLength: 64 + created: + type: string + format: date-time + readOnly: true + rules: + type: array + items: + $ref: '#/components/schemas/CallThrottleRule' PatchedPlivoConfig: type: object properties: @@ -4837,6 +5072,11 @@ components: format: date-time nullable: true description: The end of the time window during which calls can be made. + throttle: + type: string + nullable: true + description: The name or ID of a call throttle. If specified, calls in this + batch will be subject to the rate limits defined by the throttle. webhookUrl: type: string format: uri @@ -5269,6 +5509,11 @@ components: format: date-time nullable: true description: The end of the time window during which calls can be made. + throttle: + type: string + nullable: true + description: The name or ID of a call throttle. If specified, calls in this + batch will be subject to the rate limits defined by the throttle. webhookUrl: type: string format: uri