diff --git a/src/libs/Speechify/Generated/Speechify.AutoSDKHttpResponse.g.cs b/src/libs/Speechify/Generated/Speechify.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..e8baa2e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Exceptions.g.cs b/src/libs/Speechify/Generated/Speechify.Exceptions.g.cs index 71af4df..2c4e32e 100644 --- a/src/libs/Speechify/Generated/Speechify.Exceptions.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Exceptions.g.cs @@ -12,16 +12,19 @@ public partial class ApiException : global::System.Exception /// The HTTP status code of the response. /// public global::System.Net.HttpStatusCode StatusCode { get; } + /// /// The response body as a string, or null if the body could not be read. /// This is always populated for error responses regardless of the ReadResponseAsString setting. /// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read. /// public string? ResponseBody { get; set; } + /// /// The response headers. /// public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; } + /// /// Initializes a new instance of the class. /// @@ -49,6 +52,103 @@ public ApiException(string message, global::System.Exception? innerException, gl { StatusCode = statusCode; } + + /// + /// Constructs an instance whose runtime type matches the response status code when the typed exception hierarchy is enabled. Always returns a plain when the hierarchy is disabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static global::Speechify.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Speechify.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Speechify.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Speechify.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseHeaders = responseHeaders; + return exception; + } + + /// + /// Parses a Retry-After response header (delta-seconds or HTTP-date) into a . + /// Returns null when the header is missing or unparseable. Public so consumer code that observes + /// directly can recover the value without re-implementing the parser. + /// + public static global::System.TimeSpan? TryParseRetryAfter( + global::System.Collections.Generic.IDictionary>? headers) + { + if (headers == null) + { + return null; + } + + global::System.Collections.Generic.IEnumerable? values = null; + foreach (var entry in headers) + { + if (string.Equals(entry.Key, "Retry-After", global::System.StringComparison.OrdinalIgnoreCase)) + { + values = entry.Value; + break; + } + } + + if (values == null) + { + return null; + } + + string? raw = null; + foreach (var value in values) + { + if (!string.IsNullOrWhiteSpace(value)) + { + raw = value.Trim(); + break; + } + } + + if (string.IsNullOrEmpty(raw)) + { + return null; + } + + if (int.TryParse( + raw, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var seconds) && seconds >= 0) + { + return global::System.TimeSpan.FromSeconds(seconds); + } + + if (global::System.DateTimeOffset.TryParse( + raw, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var when)) + { + var delta = when - global::System.DateTimeOffset.UtcNow; + return delta > global::System.TimeSpan.Zero ? delta : global::System.TimeSpan.Zero; + } + + return null; + } } /// @@ -88,5 +188,39 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode) { } + + /// + /// Constructs an whose runtime type matches the response status code when the typed exception hierarchy is enabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static new global::Speechify.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Speechify.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Speechify.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + T? responseObject, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Speechify.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseObject = responseObject; + exception.ResponseHeaders = responseHeaders; + return exception; + } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs index f77aaea..cbc674f 100644 --- a/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs @@ -44,65 +44,15 @@ public partial interface ISpeechifyClient : global::System.IDisposable global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - /// - /// - /// - public SubpackageTtsSubpackageTtsAgentsClient SubpackageTtsSubpackageTtsAgents { get; } - /// /// /// public SubpackageTtsSubpackageTtsAudioClient SubpackageTtsSubpackageTtsAudio { get; } - /// - /// - /// - public SubpackageTtsSubpackageTtsAuthClient SubpackageTtsSubpackageTtsAuth { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsConversationsClient SubpackageTtsSubpackageTtsConversations { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsKnowledgeBasesClient SubpackageTtsSubpackageTtsKnowledgeBases { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsMemoriesClient SubpackageTtsSubpackageTtsMemories { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsOutboundCallsClient SubpackageTtsSubpackageTtsOutboundCalls { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsPhoneNumbersClient SubpackageTtsSubpackageTtsPhoneNumbers { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsSipTrunksClient SubpackageTtsSubpackageTtsSipTrunks { get; } - - /// - /// - /// - public SubpackageTtsSubpackageTtsToolsClient SubpackageTtsSubpackageTtsTools { get; } - /// /// /// public SubpackageTtsSubpackageTtsVoicesClient SubpackageTtsSubpackageTtsVoices { get; } - /// - /// - /// - public SubpackageTtsSubpackageTtsWorkspacesClient SubpackageTtsSubpackageTtsWorkspaces { get; } - } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachKnowledgeBase.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachKnowledgeBase.g.cs deleted file mode 100644 index 5f10fb8..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachKnowledgeBase.g.cs +++ /dev/null @@ -1,24 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Attach Knowledge Base
- /// Attach a knowledge base to an agent. The `search_knowledge` tool
- /// is auto-registered on the next conversation and can only query the
- /// attached knowledge bases. - ///
- /// - /// - /// 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 AttachKnowledgeBaseAsync( - string id, - string kbId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachTest.g.cs deleted file mode 100644 index a005a18..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachTest.g.cs +++ /dev/null @@ -1,25 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Attach Test
- /// Attach a test to an additional agent. After this call, the test
- /// will also run as part of that agent's regression suite (and
- /// against its prompt + tool config when invoked with
- /// `agent_id = {agentId}`). Idempotent. - ///
- /// - /// - /// 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 AttachTestAsync( - string id, - string agentId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachTool.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachTool.g.cs deleted file mode 100644 index c2baa7a..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.AttachTool.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Attach Tool
- /// Attach an existing tool to the agent so the LLM can call it. - ///
- /// - /// - /// 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 AttachToolAsync( - string id, - string toolId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Create.g.cs deleted file mode 100644 index 0581525..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Create.g.cs +++ /dev/null @@ -1,77 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Create
- /// Create a voice agent. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateAgentRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create
- /// Create a voice agent. - ///
- /// - /// - /// Optional. Server derives slug from name with a random suffix when omitted; if you supply your own, a collision returns 400 'slug already taken'. - /// - /// - /// - /// Spoken verbatim at session start — no LLM round trip. - /// - /// - /// Default Value: en - /// - /// - /// Optional chat model slug. Leave empty to use the Speechify default. - /// - /// - /// Voice slug from the VMS catalog (see GET /v1/voices). Required — the server rejects writes with an unknown or empty slug. - /// - /// - /// - /// - /// Default Value: false - /// - /// - /// - /// Optional per-agent hostname allowlist (see Agent schema). - /// - /// - /// Default Value: false - /// - /// - /// Default Value: 90 - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - string name, - string voiceId, - string? slug = default, - string? prompt = default, - string? firstMessage = default, - string? language = default, - string? llmModel = default, - double? temperature = default, - object? config = default, - bool? isPublic = default, - global::System.Collections.Generic.IList? allowedOrigins = default, - global::System.Collections.Generic.IList? hostnameAllowlist = default, - bool? memoryEnabled = default, - int? memoryRetentionDays = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateConversation.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateConversation.g.cs deleted file mode 100644 index cd7631f..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateConversation.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Create Conversation
- /// Start a new voice conversation with the agent. Returns a realtime
- /// voice session + short-lived client token so the caller can
- /// connect the audio pipeline directly. The agent is dispatched
- /// server-side; no additional client action required.
- /// Pass `dynamic_variables` to supply per-session values that override
- /// the agent's stored variable defaults for this one conversation.
- /// Keys in the `system__` namespace are rejected at this boundary. - ///
- /// - /// - /// 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 CreateConversationAsync( - string id, - - global::Speechify.TtsCreateConversationRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create Conversation
- /// Start a new voice conversation with the agent. Returns a realtime
- /// voice session + short-lived client token so the caller can
- /// connect the audio pipeline directly. The agent is dispatched
- /// server-side; no additional client action required.
- /// Pass `dynamic_variables` to supply per-session values that override
- /// the agent's stored variable defaults for this one conversation.
- /// Keys in the `system__` namespace are rejected at this boundary. - ///
- /// - /// - /// Transport hint. Omit to use the agent's default. - /// - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one conversation. Keys in the
- /// reserved `system__` namespace are rejected. Values must match the
- /// declared type of the corresponding variable definition on the agent. - /// - /// 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 CreateConversationAsync( - string id, - string? transport = default, - object? dynamicVariables = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateSession.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateSession.g.cs deleted file mode 100644 index ee4a30a..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateSession.g.cs +++ /dev/null @@ -1,76 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Create Session
- /// Mint a realtime voice session for the given agent. Widget-friendly
- /// counterpart to `createConversation` — same response shape, dual
- /// authentication:
- /// * **Authenticated (Bearer)**: works for any agent the caller
- /// owns. Typical server-to-server flow where the embedding
- /// site's backend mints a token and hands it to the browser so
- /// the API key never reaches the client.
- /// * **Unauthenticated**: works only when `agent.is_public = true`
- /// AND the request's `Origin` header matches `agent.allowed_origins`
- /// (or that list is empty). When `agent.hostname_allowlist` is
- /// non-empty, the `Origin` hostname must additionally be a
- /// member of that list. Used directly by the
- /// `<speechify-agent>` web component.
- /// Responds with the same `CreateConversationResponse` as
- /// `createConversation`. - ///
- /// - /// - /// 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 CreateSessionAsync( - string id, - - global::Speechify.TtsCreateSessionRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create Session
- /// Mint a realtime voice session for the given agent. Widget-friendly
- /// counterpart to `createConversation` — same response shape, dual
- /// authentication:
- /// * **Authenticated (Bearer)**: works for any agent the caller
- /// owns. Typical server-to-server flow where the embedding
- /// site's backend mints a token and hands it to the browser so
- /// the API key never reaches the client.
- /// * **Unauthenticated**: works only when `agent.is_public = true`
- /// AND the request's `Origin` header matches `agent.allowed_origins`
- /// (or that list is empty). When `agent.hostname_allowlist` is
- /// non-empty, the `Origin` hostname must additionally be a
- /// member of that list. Used directly by the
- /// `<speechify-agent>` web component.
- /// Responds with the same `CreateConversationResponse` as
- /// `createConversation`. - ///
- /// - /// - /// Opaque identifier for the end-user (e.g. your app's user ID). Stamped onto the conversation. Optional - defaults to an anonymous per-session ID. - /// - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one session. Keys in the
- /// reserved `system__` namespace are rejected at this boundary.
- /// Values must match the declared type of the corresponding variable
- /// definition on the agent (a `string` type expects a JSON string,
- /// `number` expects a JSON number, etc.). - /// - /// 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 CreateSessionAsync( - string id, - string? userIdentity = default, - object? dynamicVariables = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateTest.g.cs deleted file mode 100644 index 6d325d9..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateTest.g.cs +++ /dev/null @@ -1,74 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Create Test
- /// Create a new test for the agent. - ///
- /// - /// - /// 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 CreateTestAsync( - string id, - - global::Speechify.TtsCreateAgentTestRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create Test
- /// Create a new test for the agent. - ///
- /// - /// - /// Short human-readable label for the test. - /// - /// - /// Optional longer description of what this test verifies. - /// - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - /// - /// - /// Type-specific configuration. Must match the shape for the given `type`. - /// - /// - /// Optional tool-mocking config applied during every run of this test. - /// - /// - /// Per-test variable values substituted into string fields of the
- /// config at run-start. Keys use the same rules as agent-level
- /// `DynamicVariable` keys. - /// - /// - /// Folder to place the test in. Omit for root. - /// - /// - /// Optional list of additional agents this test should also run
- /// against. The owner agent (path param) is always attached
- /// implicitly. - /// - /// 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 CreateTestAsync( - string id, - string name, - global::Speechify.TtsTestType type, - global::Speechify.TtsCreateAgentTestRequestConfig config, - string? description = default, - global::Speechify.TtsToolMockConfig? toolMockConfig = default, - object? variables = default, - string? folderId = default, - global::System.Collections.Generic.IList? attachedAgentIds = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateTestFolder.g.cs deleted file mode 100644 index b4efc3b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.CreateTestFolder.g.cs +++ /dev/null @@ -1,35 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Create Test Folder
- /// Create a test folder. Max depth is 3. - ///
- /// - /// 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 CreateTestFolderAsync( - - global::Speechify.TtsCreateAgentTestFolderRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create Test Folder
- /// Create a test folder. Max depth is 3. - ///
- /// - /// - /// 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 CreateTestFolderAsync( - string name, - string? parentFolderId = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Delete.g.cs deleted file mode 100644 index df07394..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Delete.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Delete
- /// Delete a voice agent. Conversations and attached tools remain. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteMemoriesByCaller.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteMemoriesByCaller.g.cs deleted file mode 100644 index c642418..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteMemoriesByCaller.g.cs +++ /dev/null @@ -1,47 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Delete Memories By Caller
- /// Delete every memory ever extracted for a specific caller on
- /// this agent. Privacy / GDPR surface. Returns the count of rows
- /// soft-deleted; rows become permanently unreachable immediately
- /// and are hard-deleted by the retention job after the tenant's
- /// configured retention window. - ///
- /// - /// - /// 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 DeleteMemoriesByCallerAsync( - string id, - - global::Speechify.TtsDeleteMemoriesByCallerRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Delete Memories By Caller
- /// Delete every memory ever extracted for a specific caller on
- /// this agent. Privacy / GDPR surface. Returns the count of rows
- /// soft-deleted; rows become permanently unreachable immediately
- /// and are hard-deleted by the retention job after the tenant's
- /// configured retention window. - ///
- /// - /// - /// - /// 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 DeleteMemoriesByCallerAsync( - string id, - string agentId, - string callerIdentity, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteTest.g.cs deleted file mode 100644 index f479adb..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteTest.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Delete Test
- /// Delete a test and all its run history. - ///
- /// - /// 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 DeleteTestAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteTestFolder.g.cs deleted file mode 100644 index 9ee3098..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DeleteTestFolder.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Delete Test Folder
- /// Soft-delete a folder. Child tests drop back to root. - ///
- /// - /// 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 DeleteTestFolderAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachKnowledgeBase.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachKnowledgeBase.g.cs deleted file mode 100644 index 6825d40..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachKnowledgeBase.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Detach Knowledge Base
- /// Detach a knowledge base from an agent. - ///
- /// - /// - /// 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 DetachKnowledgeBaseAsync( - string id, - string kbId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachTest.g.cs deleted file mode 100644 index e0f2a55..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachTest.g.cs +++ /dev/null @@ -1,24 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Detach Test
- /// Detach a test from an agent. The owner agent (the agent the test
- /// was authored against) cannot be detached; delete the test
- /// instead. - ///
- /// - /// - /// 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 DetachTestAsync( - string id, - string agentId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachTool.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachTool.g.cs deleted file mode 100644 index 41333e7..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.DetachTool.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Detach Tool
- /// Detach a tool from the agent. - ///
- /// - /// - /// 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 DetachToolAsync( - string id, - string toolId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Get.g.cs deleted file mode 100644 index b7c96a7..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Get.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Get
- /// Retrieve a voice agent by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetDynamicVariables.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetDynamicVariables.g.cs deleted file mode 100644 index 541c707..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetDynamicVariables.g.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Get Dynamic Variables
- /// Retrieve the agent's customer-scope dynamic variables and the read-only
- /// catalogue of reserved `system__*` keys. The system variables list is
- /// provided so editor UIs can render the reference list without maintaining
- /// a client-side copy of the catalogue. - ///
- /// - /// 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 GetDynamicVariablesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetEvaluationConfig.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetEvaluationConfig.g.cs deleted file mode 100644 index 5aaf1e2..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetEvaluationConfig.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Get Evaluation Config
- /// Retrieve the agent's post-call evaluation criteria + data-collection config. - ///
- /// - /// 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 GetEvaluationConfigAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTest.g.cs deleted file mode 100644 index 149ae26..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTest.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Get Test
- /// Retrieve a test by ID. - ///
- /// - /// 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 GetTestAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTestRun.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTestRun.g.cs deleted file mode 100644 index 7542d0c..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTestRun.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Get Test Run
- /// Retrieve a single test run by ID. Poll this endpoint until
- /// `status` reaches a terminal state (`passed`, `failed`, or `error`).
- /// The `result` field is populated on terminal states. - ///
- /// - /// 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 GetTestRunAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTestStats.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTestStats.g.cs deleted file mode 100644 index 1d7bf86..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.GetTestStats.g.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Get Test Stats
- /// Aggregate pass-rate metrics over the last N days. Returns dense
- /// daily buckets (one entry per day, zero-filled) plus totals and a
- /// per-type breakdown. Powers the header chart on the global tests
- /// page. Default window is 30 days, max 90. - ///
- /// - /// 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 GetTestStatsAsync( - int? windowDays = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.List.g.cs deleted file mode 100644 index 61799fe..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List
- /// List voice agents owned by the caller. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListAgentKnowledgeBases.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListAgentKnowledgeBases.g.cs deleted file mode 100644 index 6c83d5a..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListAgentKnowledgeBases.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Agent Knowledge Bases
- /// List knowledge bases attached to an agent. - ///
- /// - /// 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 ListAgentKnowledgeBasesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListAllTests.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListAllTests.g.cs deleted file mode 100644 index 70f3607..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListAllTests.g.cs +++ /dev/null @@ -1,38 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List All Tests
- /// Workspace-wide list of tests across every agent the caller owns.
- /// Supports filters (agent, type, last-run status, folder), full-text
- /// search on name/description, and cursor pagination. Each row carries
- /// its newest run and attached agent IDs so the list renders without
- /// N+1 round-trips. - ///
- /// - /// - /// - /// - /// - /// - /// - /// - /// 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 ListAllTestsAsync( - string? agentId = default, - string? type = default, - string? status = default, - string? folderId = default, - string? updatedAfter = default, - string? q = default, - int? limit = default, - string? cursor = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListMemories.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListMemories.g.cs deleted file mode 100644 index eaffdcc..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListMemories.g.cs +++ /dev/null @@ -1,30 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Memories
- /// List per-caller memories extracted for an agent. Memories are
- /// written post-call by the built-in extractor when `memory_enabled`
- /// is true on the agent; the list is sorted newest-first. - ///
- /// - /// - /// Default Value: 100 - /// - /// - /// Default Value: 0 - /// - /// 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 ListMemoriesAsync( - string id, - int? limit = default, - int? offset = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestAttachments.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestAttachments.g.cs deleted file mode 100644 index c9fe984..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestAttachments.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Test Attachments
- /// List every agent a test is attached to. - ///
- /// - /// 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 ListTestAttachmentsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestFolders.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestFolders.g.cs deleted file mode 100644 index a777a22..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestFolders.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Test Folders
- /// List every test folder the caller owns. Flat list; build the tree client-side. - ///
- /// 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 ListTestFoldersAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestRuns.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestRuns.g.cs deleted file mode 100644 index ef11bd1..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTestRuns.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Test Runs
- /// List the run history for a test, newest first. - ///
- /// - /// 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 ListTestRunsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTests.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTests.g.cs deleted file mode 100644 index a448711..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTests.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Tests
- /// List all tests configured for the agent. Each entry includes the
- /// most recent run so the console can render pass/fail badges without
- /// an extra round-trip. - ///
- /// - /// 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 ListTestsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTools.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTools.g.cs deleted file mode 100644 index f061423..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.ListTools.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// List Tools
- /// List tools currently attached to the agent. - ///
- /// - /// 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 ListToolsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.MoveTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.MoveTest.g.cs deleted file mode 100644 index dd94895..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.MoveTest.g.cs +++ /dev/null @@ -1,37 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Move Test
- /// Move a test into a folder. Pass `folder_id: null` for root. - ///
- /// - /// - /// 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 MoveTestAsync( - string id, - - global::Speechify.TtsMoveAgentTestRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Move Test
- /// Move a test into a folder. Pass `folder_id: null` for root. - ///
- /// - /// - /// 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 MoveTestAsync( - string id, - string? folderId = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunAllTests.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunAllTests.g.cs deleted file mode 100644 index 629029a..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunAllTests.g.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Run All Tests
- /// Enqueue runs for every test on the agent concurrently. Up to 50
- /// tests are dispatched in one call. Each returned run starts in
- /// `queued` status; poll `GET /v1/test-runs/{id}` for the terminal
- /// result. - ///
- /// - /// 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 RunAllTestsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunTest.g.cs deleted file mode 100644 index 90a089d..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunTest.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Run Test
- /// Enqueue a single run of the test. The returned run starts in
- /// `queued` status. Poll `GET /v1/test-runs/{id}` until the status
- /// reaches a terminal state (`passed`, `failed`, or `error`). - ///
- /// - /// 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 RunTestAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunTestsBatch.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunTestsBatch.g.cs deleted file mode 100644 index 38ec735..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.RunTestsBatch.g.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Run Tests Batch
- /// Queue runs for every (test, agent) pair in the body. Entries
- /// without an `agent_id` fan out to every agent the test is
- /// attached to. Total expanded runs are capped at 100 per call.
- /// Each entry in the response is a queued run; poll
- /// `GET /v1/test-runs/{id}` for each. - ///
- /// - /// 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 RunTestsBatchAsync( - - global::Speechify.TtsRunBatchRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Run Tests Batch
- /// Queue runs for every (test, agent) pair in the body. Entries
- /// without an `agent_id` fan out to every agent the test is
- /// attached to. Total expanded runs are capped at 100 per call.
- /// Each entry in the response is a queued run; poll
- /// `GET /v1/test-runs/{id}` for each. - ///
- /// - /// 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 RunTestsBatchAsync( - global::System.Collections.Generic.IList entries, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Update.g.cs deleted file mode 100644 index 8cd55b6..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.Update.g.cs +++ /dev/null @@ -1,65 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Update
- /// Update a voice agent. Only fields present on the request body are changed. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - - global::Speechify.TtsUpdateAgentRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update
- /// Update a voice agent. Only fields present on the request body are changed. - ///
- /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// When supplied, replaces the stored list. Pass an empty
- /// array to clear enforcement (public agent is open again).
- /// Omit the field to leave the existing value unchanged. - /// - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - string? name = default, - string? prompt = default, - string? firstMessage = default, - string? language = default, - string? llmModel = default, - string? voiceId = default, - double? temperature = default, - object? config = default, - bool? isPublic = default, - global::System.Collections.Generic.IList? allowedOrigins = default, - global::System.Collections.Generic.IList? hostnameAllowlist = default, - bool? memoryEnabled = default, - int? memoryRetentionDays = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateDynamicVariables.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateDynamicVariables.g.cs deleted file mode 100644 index 2e049c6..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateDynamicVariables.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Update Dynamic Variables
- /// Replace the agent's customer-scope dynamic variable definitions.
- /// The supplied list overwrites the stored list wholesale (same
- /// semantics as `updateEvaluationConfig`). Pass an empty array to
- /// clear all variables. Up to 20 variables per agent. Keys must
- /// match `[a-zA-Z0-9_]+` and must not start with the reserved
- /// `system__` prefix. - ///
- /// - /// - /// 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 UpdateDynamicVariablesAsync( - string id, - - global::Speechify.TtsUpdateDynamicVariablesRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update Dynamic Variables
- /// Replace the agent's customer-scope dynamic variable definitions.
- /// The supplied list overwrites the stored list wholesale (same
- /// semantics as `updateEvaluationConfig`). Pass an empty array to
- /// clear all variables. Up to 20 variables per agent. Keys must
- /// match `[a-zA-Z0-9_]+` and must not start with the reserved
- /// `system__` prefix. - ///
- /// - /// - /// The new variable list. Replaces the existing list entirely. - /// - /// 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 UpdateDynamicVariablesAsync( - string id, - global::System.Collections.Generic.IList variables, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateEvaluationConfig.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateEvaluationConfig.g.cs deleted file mode 100644 index 172b60e..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateEvaluationConfig.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Update Evaluation Config
- /// Replace the agent's evaluation criteria + data-collection fields. - ///
- /// - /// - /// 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 UpdateEvaluationConfigAsync( - string id, - - global::Speechify.TtsUpdateEvaluationConfigRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update Evaluation Config
- /// Replace the agent's evaluation criteria + data-collection fields. - ///
- /// - /// - /// - /// 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 UpdateEvaluationConfigAsync( - string id, - global::System.Collections.Generic.IList criteria, - global::System.Collections.Generic.IList dataCollection, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateTest.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateTest.g.cs deleted file mode 100644 index 159c5eb..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateTest.g.cs +++ /dev/null @@ -1,47 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Update Test
- /// Update a test. Only fields present on the request body are changed. - ///
- /// - /// - /// 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 UpdateTestAsync( - string id, - - global::Speechify.TtsUpdateAgentTestRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update Test
- /// Update a test. Only fields present on the request body are changed. - ///
- /// - /// - /// - /// - /// Replaces the test config when present. - /// - /// - /// Replaces the tool-mock config when present. - /// - /// 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 UpdateTestAsync( - string id, - string? name = default, - string? description = default, - global::Speechify.TtsUpdateAgentTestRequestConfig? config = default, - global::Speechify.TtsToolMockConfig? toolMockConfig = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateTestFolder.g.cs deleted file mode 100644 index 32abc79..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.UpdateTestFolder.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAgentsClient - { - /// - /// Update Test Folder
- /// Rename or reparent a test folder. Cycles are rejected. - ///
- /// - /// - /// 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 UpdateTestFolderAsync( - string id, - - global::Speechify.TtsUpdateAgentTestFolderRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update Test Folder
- /// Rename or reparent a test folder. Cycles are rejected. - ///
- /// - /// - /// - /// 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 UpdateTestFolderAsync( - string id, - string? name = default, - string? parentFolderId = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.g.cs deleted file mode 100644 index f220426..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAgentsClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsAgentsClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Speech.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Speech.g.cs index 1c8a5ae..ecc3459 100644 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Speech.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Speech.g.cs @@ -5,8 +5,10 @@ namespace Speechify public partial interface ISubpackageTtsSubpackageTtsAudioClient { /// - /// Speech
- /// Gets the speech data for the given input + /// Create Speech
+ /// Synthesize speech audio from text or SSML. Returns the complete audio
+ /// file plus billing and speech-mark metadata in a single response. For
+ /// low-latency playback or long-form text, use POST /v1/audio/stream. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -18,8 +20,25 @@ public partial interface ISubpackageTtsSubpackageTtsAudioClient global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Speech
- /// Gets the speech data for the given input + /// Create Speech
+ /// Synthesize speech audio from text or SSML. Returns the complete audio
+ /// file plus billing and speech-mark metadata in a single response. For
+ /// low-latency playback or long-form text, use POST /v1/audio/stream. + ///
+ /// + /// 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> SpeechAsResponseAsync( + + global::Speechify.TtsGetSpeechRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Speech
+ /// Synthesize speech audio from text or SSML. Returns the complete audio
+ /// file plus billing and speech-mark metadata in a single response. For
+ /// low-latency playback or long-form text, use POST /v1/audio/stream. ///
/// /// The format for the output audio. Note, that the current default is "wav", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect.
@@ -35,7 +54,7 @@ public partial interface ISubpackageTtsSubpackageTtsAudioClient /// Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. /// /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Stream.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Stream.g.cs index 30bf339..f0deb1a 100644 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Stream.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAudioClient.Stream.g.cs @@ -5,23 +5,65 @@ namespace Speechify public partial interface ISubpackageTtsSubpackageTtsAudioClient { /// - /// Stream
- /// Gets the stream speech for the given input + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. ///
/// /// /// 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 StreamAsync( + global::System.Threading.Tasks.Task StreamAsync( global::Speechify.TtsV1AudioStreamPostParametersAccept accept, global::Speechify.TtsGetStreamRequest request, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Stream
- /// Gets the stream speech for the given input + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. + ///
+ /// + /// + /// 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 StreamAsStreamAsync( + global::Speechify.TtsV1AudioStreamPostParametersAccept accept, + + global::Speechify.TtsGetStreamRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. + ///
+ /// + /// + /// 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> StreamAsResponseAsync( + global::Speechify.TtsV1AudioStreamPostParametersAccept accept, + + global::Speechify.TtsGetStreamRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. ///
/// /// @@ -34,7 +76,7 @@ public partial interface ISubpackageTtsSubpackageTtsAudioClient /// Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. /// /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english /// /// @@ -46,7 +88,7 @@ public partial interface ISubpackageTtsSubpackageTtsAudioClient /// 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 StreamAsync( + global::System.Threading.Tasks.Task StreamAsync( global::Speechify.TtsV1AudioStreamPostParametersAccept accept, string input, string voiceId, diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAuthClient.CreateAccessToken.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAuthClient.CreateAccessToken.g.cs deleted file mode 100644 index d794e44..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAuthClient.CreateAccessToken.g.cs +++ /dev/null @@ -1,40 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsAuthClient - { - /// - /// Create Access Token
- /// WARNING: This endpoint is deprecated. Create a new API token for the logged in user. - ///
- /// - /// 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 CreateAccessTokenAsync( - - global::Speechify.TtsCreateAccessTokenRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create Access Token
- /// WARNING: This endpoint is deprecated. Create a new API token for the logged in user. - ///
- /// - /// in: body - /// - /// - /// The scope, or a space-delimited list of scopes the token is requested for
- /// in: body - /// - /// 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 CreateAccessTokenAsync( - global::Speechify.TtsCreateAccessTokenRequestGrantType grantType = default, - global::Speechify.TtsCreateAccessTokenRequestScope? scope = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAuthClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAuthClient.g.cs deleted file mode 100644 index d17bee3..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsAuthClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsAuthClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.Get.g.cs deleted file mode 100644 index cb6ff8e..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.Get.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsConversationsClient - { - /// - /// Get
- /// Retrieve a conversation by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.List.g.cs deleted file mode 100644 index 2792f5b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsConversationsClient - { - /// - /// List
- /// List conversations owned by the caller, ordered by most recent. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListEvaluations.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListEvaluations.g.cs deleted file mode 100644 index d0f04cb..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListEvaluations.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsConversationsClient - { - /// - /// List Evaluations
- /// Retrieve post-call evaluation results for a conversation. - ///
- /// - /// 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 ListEvaluationsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListMemories.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListMemories.g.cs deleted file mode 100644 index e438e03..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListMemories.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsConversationsClient - { - /// - /// List Memories
- /// List memories extracted from a specific conversation. - ///
- /// - /// 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 ListMemoriesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListMessages.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListMessages.g.cs deleted file mode 100644 index a0878cf..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.ListMessages.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsConversationsClient - { - /// - /// List Messages
- /// Retrieve the full transcript for a conversation, in order. - ///
- /// - /// 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 ListMessagesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.g.cs deleted file mode 100644 index 9ebdf0a..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsConversationsClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsConversationsClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Create.g.cs deleted file mode 100644 index f24a7ff..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Create.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Create
- /// Create a new knowledge base. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateKnowledgeBaseRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create
- /// Create a new knowledge base. - ///
- /// - /// Human-readable label. - /// - /// - /// Optional description. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - string name, - string? description = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Delete.g.cs deleted file mode 100644 index 5c6070c..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Delete.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Delete
- /// Soft-delete a knowledge base. Documents and chunks are cascaded. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.DeleteDocument.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.DeleteDocument.g.cs deleted file mode 100644 index ff44b84..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.DeleteDocument.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Delete Document
- /// Delete a document and all its chunks. - ///
- /// - /// 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 DeleteDocumentAsync( - string docId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Get.g.cs deleted file mode 100644 index cf4d93e..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Get.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Get
- /// Retrieve a knowledge base by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.GetDocument.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.GetDocument.g.cs deleted file mode 100644 index 04cd831..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.GetDocument.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Get Document
- /// Retrieve a document by ID. - ///
- /// - /// 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 GetDocumentAsync( - string docId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.List.g.cs deleted file mode 100644 index 9bb12ce..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// List
- /// List knowledge bases owned by the caller. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.ListChunks.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.ListChunks.g.cs deleted file mode 100644 index 37cd39f..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.ListChunks.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// List Chunks
- /// List the chunks for a document. - ///
- /// - /// 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 ListChunksAsync( - string docId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.ListDocuments.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.ListDocuments.g.cs deleted file mode 100644 index 158d176..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.ListDocuments.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// List Documents
- /// List documents ingested into a knowledge base. - ///
- /// - /// 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 ListDocumentsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Search.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Search.g.cs deleted file mode 100644 index da2b478..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Search.g.cs +++ /dev/null @@ -1,48 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Search
- /// Semantic search across a caller-owned list of knowledge bases.
- /// Returns ranked chunks with source filename and a cosine-similarity
- /// score. Limited to 50 results per request. - ///
- /// - /// 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 SearchAsync( - - global::Speechify.TtsSearchKnowledgeBasesRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Search
- /// Semantic search across a caller-owned list of knowledge bases.
- /// Returns ranked chunks with source filename and a cosine-similarity
- /// score. Limited to 50 results per request. - ///
- /// - /// Natural-language search query. - /// - /// - /// Knowledge bases to search across. Results scoped to caller-owned entries; unknown IDs are silently ignored. - /// - /// - /// Max hits to return (default 5, capped at 50).
- /// Default Value: 5 - /// - /// 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 SearchAsync( - string query, - global::System.Collections.Generic.IList kbIds, - int? topK = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Update.g.cs deleted file mode 100644 index d4c2740..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.Update.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Update
- /// Update a knowledge base. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - - global::Speechify.TtsUpdateKnowledgeBaseRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update
- /// Update a knowledge base. - ///
- /// - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - string? name = default, - string? description = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.UploadDocument.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.UploadDocument.g.cs deleted file mode 100644 index 7b43940..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.UploadDocument.g.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsKnowledgeBasesClient - { - /// - /// Upload Document
- /// Upload a document (PDF, plain text, markdown, or HTML) to a
- /// knowledge base. The document is extracted, chunked, embedded, and
- /// indexed synchronously; expect a few seconds per MB of input.
- /// Maximum 10 MB per upload. - ///
- /// - /// - /// 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 UploadDocumentAsync( - string id, - - global::Speechify.UploadDocumentRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Upload Document
- /// Upload a document (PDF, plain text, markdown, or HTML) to a
- /// knowledge base. The document is extracted, chunked, embedded, and
- /// indexed synchronously; expect a few seconds per MB of input.
- /// Maximum 10 MB per upload. - ///
- /// - /// - /// - /// 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 UploadDocumentAsync( - string id, - byte[] file, - string filename, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.g.cs deleted file mode 100644 index c537db6..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsKnowledgeBasesClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsMemoriesClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsMemoriesClient.Delete.g.cs deleted file mode 100644 index 79eff11..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsMemoriesClient.Delete.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsMemoriesClient - { - /// - /// Delete
- /// Soft-delete one memory row. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task DeleteAsync( - string memoryId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsMemoriesClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsMemoriesClient.g.cs deleted file mode 100644 index da0f9e0..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsMemoriesClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsMemoriesClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient.Create.g.cs deleted file mode 100644 index 9c719b8..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient.Create.g.cs +++ /dev/null @@ -1,47 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsOutboundCallsClient - { - /// - /// Create
- /// Place an outbound call from an agent to a phone number. LiveKit
- /// originates the SIP INVITE through the outbound trunk bound to the
- /// agent's workspace; the agent worker is dispatched into the room
- /// automatically.
- /// The response is returned as soon as LiveKit accepts the INVITE.
- /// Poll `GET /v1/conversations/{conversation_id}` for status
- /// transitions: `pending` → `active` (answered) → `completed`.
- /// Requires a Twilio or BYOC trunk. LiveKit-native numbers are
- /// inbound-only. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create
- /// Place an outbound call from an agent to a phone number. LiveKit
- /// originates the SIP INVITE through the outbound trunk bound to the
- /// agent's workspace; the agent worker is dispatched into the room
- /// automatically.
- /// The response is returned as soon as LiveKit accepts the INVITE.
- /// Poll `GET /v1/conversations/{conversation_id}` for status
- /// transitions: `pending` → `active` (answered) → `completed`.
- /// Requires a Twilio or BYOC trunk. LiveKit-native numbers are
- /// inbound-only. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient.g.cs deleted file mode 100644 index 9d7794e..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsOutboundCallsClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Delete.g.cs deleted file mode 100644 index f6b2437..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Delete.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsPhoneNumbersClient - { - /// - /// Delete
- /// Delete a phone number from the workspace. For Twilio and LiveKit
- /// numbers this also deprovisions the backing SIP trunk and dispatch
- /// rule on LiveKit Cloud. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Get.g.cs deleted file mode 100644 index 973f17b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Get.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsPhoneNumbersClient - { - /// - /// Get
- /// Retrieve a phone number by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Import.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Import.g.cs deleted file mode 100644 index f771720..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Import.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsPhoneNumbersClient - { - /// - /// Import
- /// Import a phone number into the workspace. The `source` field
- /// determines the provisioning path:
- /// - `livekit` - LiveKit purchases the number on your behalf. US
- /// inbound only. Quickest path for local testing.
- /// - `twilio` - Provide your Twilio Account SID, Auth Token, and
- /// the E.164 number you already own. We provision an Elastic SIP
- /// Trunk on your Twilio account automatically.
- /// - `byoc` - Provide an existing SIP trunk ID. The number is
- /// registered against that trunk.
- /// Returns 402 when the workspace has reached the 100-number cap. - ///
- /// - /// 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 ImportAsync( - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Import
- /// Import a phone number into the workspace. The `source` field
- /// determines the provisioning path:
- /// - `livekit` - LiveKit purchases the number on your behalf. US
- /// inbound only. Quickest path for local testing.
- /// - `twilio` - Provide your Twilio Account SID, Auth Token, and
- /// the E.164 number you already own. We provision an Elastic SIP
- /// Trunk on your Twilio account automatically.
- /// - `byoc` - Provide an existing SIP trunk ID. The number is
- /// registered against that trunk.
- /// Returns 402 when the workspace has reached the 100-number cap. - ///
- /// 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 ImportAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.List.g.cs deleted file mode 100644 index 91d9b54..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsPhoneNumbersClient - { - /// - /// List
- /// List all phone numbers in the caller's workspace. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Update.g.cs deleted file mode 100644 index bab09a3..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.Update.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsPhoneNumbersClient - { - /// - /// Update
- /// Update a phone number. Only `label` and `agent_id` are mutable;
- /// `source` and `e164` are immutable after import. Pass `null` for
- /// `agent_id` to unbind the number from its current agent. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update
- /// Update a phone number. Only `label` and `agent_id` are mutable;
- /// `source` and `e164` are immutable after import. Pass `null` for
- /// `agent_id` to unbind the number from its current agent. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.g.cs deleted file mode 100644 index 5448e9c..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsPhoneNumbersClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Create.g.cs deleted file mode 100644 index f765553..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Create.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsSipTrunksClient - { - /// - /// Create
- /// Create a SIP trunk. For `kind=byoc` supply `sip_address` plus
- /// optional digest credentials and IP allowlist. For `kind=twilio`
- /// use `ImportPhoneNumber` with a `twilio` spec instead - trunk
- /// creation is handled automatically. Returns 402 when the workspace
- /// has reached the 20-trunk cap. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create
- /// Create a SIP trunk. For `kind=byoc` supply `sip_address` plus
- /// optional digest credentials and IP allowlist. For `kind=twilio`
- /// use `ImportPhoneNumber` with a `twilio` spec instead - trunk
- /// creation is handled automatically. Returns 402 when the workspace
- /// has reached the 20-trunk cap. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Delete.g.cs deleted file mode 100644 index c64159a..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Delete.g.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsSipTrunksClient - { - /// - /// Delete
- /// Delete a SIP trunk. This also removes the backing LiveKit inbound
- /// trunk, outbound trunk, and dispatch rule if they were provisioned
- /// by us. Phone numbers attached to this trunk are left in place but
- /// become non-functional until rebound to a new trunk. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Get.g.cs deleted file mode 100644 index c16f578..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.Get.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsSipTrunksClient - { - /// - /// Get
- /// Retrieve a SIP trunk by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.List.g.cs deleted file mode 100644 index f93f776..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsSipTrunksClient - { - /// - /// List
- /// List all SIP trunks in the caller's workspace. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.g.cs deleted file mode 100644 index 2f5a9fe..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsSipTrunksClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Create.g.cs deleted file mode 100644 index adb6db2..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Create.g.cs +++ /dev/null @@ -1,48 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsToolsClient - { - /// - /// Create
- /// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
- /// reads return a masked placeholder. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateToolRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create
- /// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
- /// reads return a masked placeholder. - ///
- /// - /// - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - string name, - string description, - global::Speechify.TtsToolKind kind, - global::Speechify.TtsCreateToolRequestConfig config, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Delete.g.cs deleted file mode 100644 index 1eb405b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Delete.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsToolsClient - { - /// - /// Delete
- /// Delete a tool. Agents that had it attached get a soft-detach. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Get.g.cs deleted file mode 100644 index 91b813e..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Get.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsToolsClient - { - /// - /// Get
- /// Retrieve a tool by ID. Webhook secrets are always masked here. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.List.g.cs deleted file mode 100644 index c0987e9..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsToolsClient - { - /// - /// List
- /// List tools owned by the caller. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Update.g.cs deleted file mode 100644 index 28b5141..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.Update.g.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsToolsClient - { - /// - /// Update
- /// Update a tool. Tool kind is immutable — create a new tool to change it. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - - global::Speechify.TtsUpdateToolRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update
- /// Update a tool. Tool kind is immutable — create a new tool to change it. - ///
- /// - /// - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task UpdateAsync( - string id, - string? name = default, - string? description = default, - global::Speechify.TtsUpdateToolRequestConfig? config = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.g.cs deleted file mode 100644 index 25be947..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsToolsClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsToolsClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Create.g.cs index 4c4f060..65d344e 100644 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Create.g.cs @@ -5,7 +5,7 @@ namespace Speechify public partial interface ISubpackageTtsSubpackageTtsVoicesClient { /// - /// Create
+ /// Create Voice
/// Create a personal (cloned) voice for the user ///
/// @@ -18,7 +18,20 @@ public partial interface ISubpackageTtsSubpackageTtsVoicesClient global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Create
+ /// Create Voice
+ /// Create a personal (cloned) voice for the user + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateAsResponseAsync( + + global::Speechify.CreateRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Voice
/// Create a personal (cloned) voice for the user ///
/// @@ -65,5 +78,102 @@ public partial interface ISubpackageTtsSubpackageTtsVoicesClient string? avatarname = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create Voice
+ /// Create a personal (cloned) voice for the user + ///
+ /// + /// Name of the personal voice + /// + /// + /// Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)
+ /// Default Value: en-US + /// + /// + /// Gender marker for the personal voice
+ /// male GenderMale
+ /// female GenderFemale
+ /// notSpecified GenderNotSpecified + /// + /// + /// Audio sample file + /// + /// + /// Audio sample file + /// + /// + /// Avatar image file + /// + /// + /// Avatar image file + /// + /// + /// A **string** representing the user consent information in JSON format
+ /// This should include the fullName and email of the consenting individual.
+ /// For example, `{"fullName": "John Doe", "email": "john@example.com"}` + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateAsync( + string name, + global::Speechify.TtsV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender gender, + global::System.IO.Stream sample, + string samplename, + string consent, + string? locale = default, + global::System.IO.Stream? avatar = default, + string? avatarname = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Voice
+ /// Create a personal (cloned) voice for the user + ///
+ /// + /// Name of the personal voice + /// + /// + /// Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)
+ /// Default Value: en-US + /// + /// + /// Gender marker for the personal voice
+ /// male GenderMale
+ /// female GenderFemale
+ /// notSpecified GenderNotSpecified + /// + /// + /// Audio sample file + /// + /// + /// Audio sample file + /// + /// + /// Avatar image file + /// + /// + /// Avatar image file + /// + /// + /// A **string** representing the user consent information in JSON format
+ /// This should include the fullName and email of the consenting individual.
+ /// For example, `{"fullName": "John Doe", "email": "john@example.com"}` + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateAsResponseAsync( + string name, + global::Speechify.TtsV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender gender, + global::System.IO.Stream sample, + string samplename, + string consent, + string? locale = default, + global::System.IO.Stream? avatar = default, + string? avatarname = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs index a94a15e..2593ed6 100644 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs @@ -5,14 +5,26 @@ namespace Speechify public partial interface ISubpackageTtsSubpackageTtsVoicesClient { /// - /// Delete
+ /// Delete Voice
/// Delete a personal (cloned) voice ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task DeleteAsync( + global::System.Threading.Tasks.Task DeleteAsync( + string id, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Voice
+ /// Delete a personal (cloned) voice + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> DeleteAsResponseAsync( string id, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs index 34c9263..e2a73e6 100644 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs @@ -5,7 +5,7 @@ namespace Speechify public partial interface ISubpackageTtsSubpackageTtsVoicesClient { /// - /// Download Sample
+ /// Download Voice Sample
/// Download a personal (cloned) voice sample ///
/// @@ -16,5 +16,29 @@ public partial interface ISubpackageTtsSubpackageTtsVoicesClient string id, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Download Voice Sample
+ /// Download a personal (cloned) voice sample + ///
+ /// + /// 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 DownloadSampleAsStreamAsync( + string id, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Download Voice Sample
+ /// Download a personal (cloned) voice sample + ///
+ /// + /// 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> DownloadSampleAsResponseAsync( + string id, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.List.g.cs index 90d2180..a8e5d3c 100644 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.List.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsVoicesClient.List.g.cs @@ -5,7 +5,7 @@ namespace Speechify public partial interface ISubpackageTtsSubpackageTtsVoicesClient { /// - /// List
+ /// List Voices
/// Gets the list of voices available for the user ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -14,5 +14,15 @@ public partial interface ISubpackageTtsSubpackageTtsVoicesClient global::System.Threading.Tasks.Task> ListAsync( global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Voices
+ /// Gets the list of voices available for the user + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListAsResponseAsync( + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.AcceptInvite.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.AcceptInvite.g.cs deleted file mode 100644 index 1222249..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.AcceptInvite.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Accept Invite
- /// Accept a workspace invite. The authenticated caller is joined
- /// to the invite's workspace as a member. Expired, revoked, or
- /// already-accepted tokens return 404 to avoid token enumeration. - ///
- /// - /// 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 AcceptInviteAsync( - string token, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.Create.g.cs deleted file mode 100644 index 58de683..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.Create.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Create
- /// Create a new workspace with the authenticated user as owner.
- /// The caller must switch their active workspace client-side via
- /// the `X-Tenant-ID` header to act on the new tenant. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateWorkspaceRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create
- /// Create a new workspace with the authenticated user as owner.
- /// The caller must switch their active workspace client-side via
- /// the `X-Tenant-ID` header to act on the new tenant. - ///
- /// - /// Display name for the new workspace. Trimmed; must be 120 characters or fewer. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateAsync( - string? name = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.CreateInvite.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.CreateInvite.g.cs deleted file mode 100644 index 4e214af..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.CreateInvite.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Create Invite
- /// Create an invite to the current workspace. Owner or admin only.
- /// The response contains the invite token ONCE — subsequent list
- /// calls redact it. - ///
- /// - /// 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 CreateInviteAsync( - - global::Speechify.TtsCreateInviteRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create Invite
- /// Create an invite to the current workspace. Owner or admin only.
- /// The response contains the invite token ONCE — subsequent list
- /// calls redact it. - ///
- /// - /// Email of the person to invite. Validated as an RFC 5322 address. - /// - /// 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 CreateInviteAsync( - string email, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.GetCurrent.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.GetCurrent.g.cs deleted file mode 100644 index 912cb64..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.GetCurrent.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Get Current
- /// Retrieve the workspace currently selected by the caller (via `X-Tenant-ID` or auto-resolved). - ///
- /// 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 GetCurrentAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.Leave.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.Leave.g.cs deleted file mode 100644 index 4553649..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.Leave.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Leave
- /// Remove the authenticated caller from the current workspace.
- /// Refused with 409 when the caller is the last owner — promote
- /// another member to owner first. - ///
- /// 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 LeaveAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.List.g.cs deleted file mode 100644 index 7457c1e..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.List.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// List
- /// List every workspace the authenticated user belongs to. Powers the workspace switcher. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.ListInvites.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.ListInvites.g.cs deleted file mode 100644 index 6abeb1f..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.ListInvites.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// List Invites
- /// List outstanding invites for the current workspace. Invite tokens are redacted. - ///
- /// 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 ListInvitesAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.ListMembers.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.ListMembers.g.cs deleted file mode 100644 index e323a1b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.ListMembers.g.cs +++ /dev/null @@ -1,18 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// List Members
- /// List every member of the current workspace. Any member may call this. - ///
- /// 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 ListMembersAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.PreviewInvite.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.PreviewInvite.g.cs deleted file mode 100644 index d70451b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.PreviewInvite.g.cs +++ /dev/null @@ -1,27 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Preview Invite
- /// Preview a workspace invite without authenticating. Returns the
- /// workspace name, inviter details, and expiry so the `/join/{token}`
- /// page can render before the recipient signs in. Anyone with the
- /// token can already accept, so this endpoint deliberately surfaces
- /// the same information a caller would see after accepting. Invalid
- /// tokens (unknown, expired, revoked, already-accepted, or pointing
- /// at a soft-deleted workspace) collapse to a single 404 to prevent
- /// enumeration. - ///
- /// - /// 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 PreviewInviteAsync( - string token, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.RemoveMember.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.RemoveMember.g.cs deleted file mode 100644 index 7e52961..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.RemoveMember.g.cs +++ /dev/null @@ -1,22 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Remove Member
- /// Remove a member from the current workspace. Owner or admin
- /// only. The caller cannot remove themselves — use
- /// `POST /v1/tenants/current/members/leave` instead. - ///
- /// - /// 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 RemoveMemberAsync( - string userUid, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.RevokeInvite.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.RevokeInvite.g.cs deleted file mode 100644 index dfe188d..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.RevokeInvite.g.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Revoke Invite
- /// Revoke an outstanding invite. Owner or admin only. Idempotent. - ///
- /// - /// 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 RevokeInviteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.TransferWorkspaceOwner.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.TransferWorkspaceOwner.g.cs deleted file mode 100644 index d598b83..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.TransferWorkspaceOwner.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Transfer Workspace Owner
- /// Transfer ownership of the current workspace atomically. Promotes
- /// the target member to owner and demotes the caller to admin in a
- /// single transaction. Owner-only; admins cannot hand off a role
- /// they were never granted. Prefer this over two PATCH calls to
- /// `/v1/tenants/current/members/{user_uid}`: a sole-owner caller
- /// cannot demote themselves first without tripping the last-owner
- /// guard, which this endpoint sidesteps by promoting before
- /// demoting. - ///
- /// - /// 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 TransferWorkspaceOwnerAsync( - - global::Speechify.TtsTransferOwnershipRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Transfer Workspace Owner
- /// Transfer ownership of the current workspace atomically. Promotes
- /// the target member to owner and demotes the caller to admin in a
- /// single transaction. Owner-only; admins cannot hand off a role
- /// they were never granted. Prefer this over two PATCH calls to
- /// `/v1/tenants/current/members/{user_uid}`: a sole-owner caller
- /// cannot demote themselves first without tripping the last-owner
- /// guard, which this endpoint sidesteps by promoting before
- /// demoting. - ///
- /// - /// Firebase UID of the member who will become the new owner. - /// - /// 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 TransferWorkspaceOwnerAsync( - string userUid, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.UpdateCurrent.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.UpdateCurrent.g.cs deleted file mode 100644 index 491d0b7..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.UpdateCurrent.g.cs +++ /dev/null @@ -1,35 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Update Current
- /// Rename the current workspace. Owner or admin only. - ///
- /// - /// 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 UpdateCurrentAsync( - - global::Speechify.TtsUpdateWorkspaceRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update Current
- /// Rename the current workspace. Owner or admin only. - ///
- /// - /// New display name. Required; must be 120 characters or fewer. - /// - /// 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 UpdateCurrentAsync( - string name, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.UpdateMemberRole.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.UpdateMemberRole.g.cs deleted file mode 100644 index f25da99..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.UpdateMemberRole.g.cs +++ /dev/null @@ -1,46 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface ISubpackageTtsSubpackageTtsWorkspacesClient - { - /// - /// Update Member Role
- /// Change a member's role. Owner only — admins may add or remove
- /// members but may not change roles. Refused with 409 when
- /// demoting the last remaining owner. - ///
- /// - /// - /// 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 UpdateMemberRoleAsync( - string userUid, - - global::Speechify.TtsUpdateMemberRoleRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Update Member Role
- /// Change a member's role. Owner only — admins may add or remove
- /// members but may not change roles. Refused with 409 when
- /// demoting the last remaining owner. - ///
- /// - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - /// - /// 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 UpdateMemberRoleAsync( - string userUid, - global::Speechify.TtsMemberRole role, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.g.cs deleted file mode 100644 index 9ad3c8b..0000000 --- a/src/libs/Speechify/Generated/Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 ISubpackageTtsSubpackageTtsWorkspacesClient : 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::Speechify.AutoSDKClientOptions Options { get; } - - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OneOf2.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OneOf2.g.cs deleted file mode 100644 index 2a92ef5..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.OneOf2.g.cs +++ /dev/null @@ -1,158 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::Speechify.OneOf Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - } - } - - var __score0 = 0; - { - var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options); - if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) - { - foreach (var __prop in __ti.Properties) - { - if (__jsonProps.Contains(__prop.Name)) __score0++; - } - } - } - var __score1 = 0; - { - var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options); - if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) - { - foreach (var __prop in __ti.Properties) - { - if (__jsonProps.Contains(__prop.Name)) __score1++; - } - } - } - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - - T1? value1 = default; - T2? value2 = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - else if (__bestIndex == 1) - { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (value1 == null && value2 == null) - { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.OneOf( - value1, - - value2 - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.OneOf value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenScope.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenScope.g.cs deleted file mode 100644 index 78da3d0..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenScope.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsAccessTokenScopeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsAccessTokenScope Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsAccessTokenScopeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsAccessTokenScope)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsAccessTokenScope); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsAccessTokenScope value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsAccessTokenScopeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenScopeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenScopeNullable.g.cs deleted file mode 100644 index 8b2f4fb..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenScopeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsAccessTokenScopeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsAccessTokenScope? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsAccessTokenScopeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsAccessTokenScope)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsAccessTokenScope?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsAccessTokenScope? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsAccessTokenScopeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenTokenType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenTokenType.g.cs deleted file mode 100644 index c363402..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenTokenType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsAccessTokenTokenTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsAccessTokenTokenType Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsAccessTokenTokenTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsAccessTokenTokenType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsAccessTokenTokenType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsAccessTokenTokenType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsAccessTokenTokenTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenTokenTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenTokenTypeNullable.g.cs deleted file mode 100644 index 73a191f..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAccessTokenTokenTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsAccessTokenTokenTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsAccessTokenTokenType? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsAccessTokenTokenTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsAccessTokenTokenType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsAccessTokenTokenType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsAccessTokenTokenType? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsAccessTokenTokenTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAgentTestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAgentTestConfig.g.cs deleted file mode 100644 index 54dd292..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsAgentTestConfig.g.cs +++ /dev/null @@ -1,193 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Speechify.JsonConverters -{ - /// - public class TtsAgentTestConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsAgentTestConfig Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("context")) __score0++; - if (__jsonProps.Contains("failure_examples")) __score0++; - if (__jsonProps.Contains("first_message_override")) __score0++; - if (__jsonProps.Contains("initial_chat_history")) __score0++; - if (__jsonProps.Contains("model_override")) __score0++; - if (__jsonProps.Contains("success_criteria")) __score0++; - if (__jsonProps.Contains("success_examples")) __score0++; - if (__jsonProps.Contains("system_prompt_override")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("context")) __score1++; - if (__jsonProps.Contains("expected_tool")) __score1++; - if (__jsonProps.Contains("initial_chat_history")) __score1++; - if (__jsonProps.Contains("model_override")) __score1++; - if (__jsonProps.Contains("parameter_checks")) __score1++; - if (__jsonProps.Contains("system_prompt_override")) __score1++; - var __score2 = 0; - if (__jsonProps.Contains("initial_chat_history")) __score2++; - if (__jsonProps.Contains("max_turns")) __score2++; - if (__jsonProps.Contains("model_override")) __score2++; - if (__jsonProps.Contains("scenario")) __score2++; - if (__jsonProps.Contains("success_condition")) __score2++; - if (__jsonProps.Contains("system_prompt_override")) __score2++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - global::Speechify.TtsScenarioConfig? scenarioConfig = default; - global::Speechify.TtsToolCallConfig? toolCallConfig = default; - global::Speechify.TtsSimulationConfig? simulationConfig = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - scenarioConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - toolCallConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 2) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - simulationConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (scenarioConfig == null && toolCallConfig == null && simulationConfig == null) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - scenarioConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - toolCallConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - simulationConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.TtsAgentTestConfig( - scenarioConfig, - - toolCallConfig, - - simulationConfig - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsAgentTestConfig value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsScenarioConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ScenarioConfig!, typeInfo); - } - else if (value.IsToolCallConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallConfig!, typeInfo); - } - else if (value.IsSimulationConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SimulationConfig!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationStatus.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationStatus.g.cs deleted file mode 100644 index eb0bf86..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsConversationStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsConversationStatus Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsConversationStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsConversationStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsConversationStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsConversationStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsConversationStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationStatusNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationStatusNullable.g.cs deleted file mode 100644 index ea39ac4..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsConversationStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsConversationStatus? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsConversationStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsConversationStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsConversationStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsConversationStatus? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsConversationStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationTransport.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationTransport.g.cs deleted file mode 100644 index 1264246..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationTransport.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsConversationTransportJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsConversationTransport Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsConversationTransportExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsConversationTransport)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsConversationTransport); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsConversationTransport value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsConversationTransportExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationTransportNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationTransportNullable.g.cs deleted file mode 100644 index 4e0ac37..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsConversationTransportNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsConversationTransportNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsConversationTransport? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsConversationTransportExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsConversationTransport)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsConversationTransport?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsConversationTransport? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsConversationTransportExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantType.g.cs deleted file mode 100644 index 3e246db..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsCreateAccessTokenRequestGrantTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsCreateAccessTokenRequestGrantType Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsCreateAccessTokenRequestGrantTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsCreateAccessTokenRequestGrantType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsCreateAccessTokenRequestGrantType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsCreateAccessTokenRequestGrantType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsCreateAccessTokenRequestGrantTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantTypeNullable.g.cs deleted file mode 100644 index 8688301..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsCreateAccessTokenRequestGrantTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsCreateAccessTokenRequestGrantType? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsCreateAccessTokenRequestGrantTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsCreateAccessTokenRequestGrantType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsCreateAccessTokenRequestGrantType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsCreateAccessTokenRequestGrantType? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsCreateAccessTokenRequestGrantTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestScope.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestScope.g.cs deleted file mode 100644 index 1082236..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestScope.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsCreateAccessTokenRequestScopeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsCreateAccessTokenRequestScope Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsCreateAccessTokenRequestScopeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsCreateAccessTokenRequestScope)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsCreateAccessTokenRequestScope); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsCreateAccessTokenRequestScope value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsCreateAccessTokenRequestScopeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestScopeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestScopeNullable.g.cs deleted file mode 100644 index 88907be..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAccessTokenRequestScopeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsCreateAccessTokenRequestScopeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsCreateAccessTokenRequestScope? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsCreateAccessTokenRequestScopeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsCreateAccessTokenRequestScope)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsCreateAccessTokenRequestScope?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsCreateAccessTokenRequestScope? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsCreateAccessTokenRequestScopeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAgentTestRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAgentTestRequestConfig.g.cs deleted file mode 100644 index e710e90..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateAgentTestRequestConfig.g.cs +++ /dev/null @@ -1,193 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Speechify.JsonConverters -{ - /// - public class TtsCreateAgentTestRequestConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsCreateAgentTestRequestConfig Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("context")) __score0++; - if (__jsonProps.Contains("failure_examples")) __score0++; - if (__jsonProps.Contains("first_message_override")) __score0++; - if (__jsonProps.Contains("initial_chat_history")) __score0++; - if (__jsonProps.Contains("model_override")) __score0++; - if (__jsonProps.Contains("success_criteria")) __score0++; - if (__jsonProps.Contains("success_examples")) __score0++; - if (__jsonProps.Contains("system_prompt_override")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("context")) __score1++; - if (__jsonProps.Contains("expected_tool")) __score1++; - if (__jsonProps.Contains("initial_chat_history")) __score1++; - if (__jsonProps.Contains("model_override")) __score1++; - if (__jsonProps.Contains("parameter_checks")) __score1++; - if (__jsonProps.Contains("system_prompt_override")) __score1++; - var __score2 = 0; - if (__jsonProps.Contains("initial_chat_history")) __score2++; - if (__jsonProps.Contains("max_turns")) __score2++; - if (__jsonProps.Contains("model_override")) __score2++; - if (__jsonProps.Contains("scenario")) __score2++; - if (__jsonProps.Contains("success_condition")) __score2++; - if (__jsonProps.Contains("system_prompt_override")) __score2++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - global::Speechify.TtsScenarioConfig? scenarioConfig = default; - global::Speechify.TtsToolCallConfig? toolCallConfig = default; - global::Speechify.TtsSimulationConfig? simulationConfig = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - scenarioConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - toolCallConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 2) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - simulationConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (scenarioConfig == null && toolCallConfig == null && simulationConfig == null) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - scenarioConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - toolCallConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - simulationConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.TtsCreateAgentTestRequestConfig( - scenarioConfig, - - toolCallConfig, - - simulationConfig - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsCreateAgentTestRequestConfig value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsScenarioConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ScenarioConfig!, typeInfo); - } - else if (value.IsToolCallConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallConfig!, typeInfo); - } - else if (value.IsSimulationConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SimulationConfig!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateToolRequestConfig.g.cs deleted file mode 100644 index 27dba30..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsCreateToolRequestConfig.g.cs +++ /dev/null @@ -1,183 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Speechify.JsonConverters -{ - /// - public class TtsCreateToolRequestConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsCreateToolRequestConfig Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("builtin")) __score0++; - if (__jsonProps.Contains("builtin_config")) __score0++; - if (__jsonProps.Contains("params")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("headers")) __score1++; - if (__jsonProps.Contains("method")) __score1++; - if (__jsonProps.Contains("params")) __score1++; - if (__jsonProps.Contains("timeout_ms")) __score1++; - if (__jsonProps.Contains("url")) __score1++; - var __score2 = 0; - if (__jsonProps.Contains("params")) __score2++; - if (__jsonProps.Contains("timeout_ms")) __score2++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - global::Speechify.TtsSystemToolConfig? systemToolConfig = default; - global::Speechify.TtsWebhookToolConfig? webhookToolConfig = default; - global::Speechify.TtsClientToolConfig? clientToolConfig = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - systemToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - webhookToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 2) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - clientToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (systemToolConfig == null && webhookToolConfig == null && clientToolConfig == null) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - systemToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - webhookToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - clientToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.TtsCreateToolRequestConfig( - systemToolConfig, - - webhookToolConfig, - - clientToolConfig - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsCreateToolRequestConfig value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsSystemToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemToolConfig!, typeInfo); - } - else if (value.IsWebhookToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebhookToolConfig!, typeInfo); - } - else if (value.IsClientToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ClientToolConfig!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDataCollectionFieldType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDataCollectionFieldType.g.cs deleted file mode 100644 index cc88f5b..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDataCollectionFieldType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsDataCollectionFieldTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsDataCollectionFieldType Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsDataCollectionFieldTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsDataCollectionFieldType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsDataCollectionFieldType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsDataCollectionFieldType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsDataCollectionFieldTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDataCollectionFieldTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDataCollectionFieldTypeNullable.g.cs deleted file mode 100644 index 13c1896..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDataCollectionFieldTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsDataCollectionFieldTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsDataCollectionFieldType? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsDataCollectionFieldTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsDataCollectionFieldType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsDataCollectionFieldType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsDataCollectionFieldType? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsDataCollectionFieldTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDynamicVariableType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDynamicVariableType.g.cs deleted file mode 100644 index 126f4ca..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDynamicVariableType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsDynamicVariableTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsDynamicVariableType Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsDynamicVariableTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsDynamicVariableType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsDynamicVariableType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsDynamicVariableType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsDynamicVariableTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDynamicVariableTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDynamicVariableTypeNullable.g.cs deleted file mode 100644 index f16ecb1..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsDynamicVariableTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsDynamicVariableTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsDynamicVariableType? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsDynamicVariableTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsDynamicVariableType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsDynamicVariableType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsDynamicVariableType? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsDynamicVariableTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolKind.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsErrorCode.g.cs similarity index 70% rename from src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolKind.g.cs rename to src/libs/Speechify/Generated/Speechify.JsonConverters.TtsErrorCode.g.cs index ae54b55..2c1cee7 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolKind.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsErrorCode.g.cs @@ -3,10 +3,10 @@ namespace Speechify.JsonConverters { /// - public sealed class TtsToolKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class TtsErrorCodeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Speechify.TtsToolKind Read( + public override global::Speechify.TtsErrorCode Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class TtsToolKindJsonConverter : global::System.Text.Json.Serializ var stringValue = reader.GetString(); if (stringValue != null) { - return global::Speechify.TtsToolKindExtensions.ToEnum(stringValue) ?? default; + return global::Speechify.TtsErrorCodeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class TtsToolKindJsonConverter : global::System.Text.Json.Serializ case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Speechify.TtsToolKind)numValue; + return (global::Speechify.TtsErrorCode)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Speechify.TtsToolKind); + return default(global::Speechify.TtsErrorCode); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class TtsToolKindJsonConverter : global::System.Text.Json.Serializ /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsToolKind value, + global::Speechify.TtsErrorCode value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Speechify.TtsToolKindExtensions.ToValueString(value)); + writer.WriteStringValue(global::Speechify.TtsErrorCodeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolKindNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsErrorCodeNullable.g.cs similarity index 71% rename from src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolKindNullable.g.cs rename to src/libs/Speechify/Generated/Speechify.JsonConverters.TtsErrorCodeNullable.g.cs index 61df498..e557a0c 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolKindNullable.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsErrorCodeNullable.g.cs @@ -3,10 +3,10 @@ namespace Speechify.JsonConverters { /// - public sealed class TtsToolKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class TtsErrorCodeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Speechify.TtsToolKind? Read( + public override global::Speechify.TtsErrorCode? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class TtsToolKindNullableJsonConverter : global::System.Text.Json. var stringValue = reader.GetString(); if (stringValue != null) { - return global::Speechify.TtsToolKindExtensions.ToEnum(stringValue); + return global::Speechify.TtsErrorCodeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class TtsToolKindNullableJsonConverter : global::System.Text.Json. case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Speechify.TtsToolKind)numValue; + return (global::Speechify.TtsErrorCode)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Speechify.TtsToolKind?); + return default(global::Speechify.TtsErrorCode?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class TtsToolKindNullableJsonConverter : global::System.Text.Json. /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsToolKind? value, + global::Speechify.TtsErrorCode? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Speechify.TtsToolKindExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Speechify.TtsErrorCodeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationKind.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationKind.g.cs deleted file mode 100644 index 6956d95..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationKind.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsEvaluationKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsEvaluationKind Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsEvaluationKindExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsEvaluationKind)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsEvaluationKind); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsEvaluationKind value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsEvaluationKindExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationKindNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationKindNullable.g.cs deleted file mode 100644 index 05909ff..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationKindNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsEvaluationKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsEvaluationKind? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsEvaluationKindExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsEvaluationKind)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsEvaluationKind?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsEvaluationKind? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsEvaluationKindExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationStatus.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationStatus.g.cs deleted file mode 100644 index af205a1..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsEvaluationStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsEvaluationStatus Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsEvaluationStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsEvaluationStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsEvaluationStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsEvaluationStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsEvaluationStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationStatusNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationStatusNullable.g.cs deleted file mode 100644 index 1fd758e..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsEvaluationStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsEvaluationStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsEvaluationStatus? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsEvaluationStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsEvaluationStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsEvaluationStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsEvaluationStatus? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsEvaluationStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatus.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatus.g.cs deleted file mode 100644 index 1cca807..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsKnowledgeBaseDocumentStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsKnowledgeBaseDocumentStatus Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsKnowledgeBaseDocumentStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsKnowledgeBaseDocumentStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsKnowledgeBaseDocumentStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsKnowledgeBaseDocumentStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsKnowledgeBaseDocumentStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatusNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatusNullable.g.cs deleted file mode 100644 index 1a7dc68..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsKnowledgeBaseDocumentStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsKnowledgeBaseDocumentStatus? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsKnowledgeBaseDocumentStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsKnowledgeBaseDocumentStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsKnowledgeBaseDocumentStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsKnowledgeBaseDocumentStatus? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsKnowledgeBaseDocumentStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMemberRole.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMemberRole.g.cs deleted file mode 100644 index 6adb96f..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMemberRole.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsMemberRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsMemberRole Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsMemberRoleExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsMemberRole)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsMemberRole); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsMemberRole value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsMemberRoleExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMemberRoleNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMemberRoleNullable.g.cs deleted file mode 100644 index 10f8e1b..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMemberRoleNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsMemberRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsMemberRole? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsMemberRoleExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsMemberRole)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsMemberRole?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsMemberRole? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsMemberRoleExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMessageRole.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMessageRole.g.cs deleted file mode 100644 index ead2579..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMessageRole.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsMessageRole Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsMessageRoleExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsMessageRole)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsMessageRole); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsMessageRole value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsMessageRoleExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMessageRoleNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMessageRoleNullable.g.cs deleted file mode 100644 index 2354cc5..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMessageRoleNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsMessageRole? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsMessageRoleExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsMessageRole)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsMessageRole?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsMessageRole? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsMessageRoleExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMockingStrategy.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMockingStrategy.g.cs deleted file mode 100644 index d8a1423..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMockingStrategy.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsMockingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsMockingStrategy Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsMockingStrategyExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsMockingStrategy)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsMockingStrategy); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsMockingStrategy value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsMockingStrategyExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMockingStrategyNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMockingStrategyNullable.g.cs deleted file mode 100644 index 95a38c4..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsMockingStrategyNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsMockingStrategyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsMockingStrategy? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsMockingStrategyExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsMockingStrategy)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsMockingStrategy?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsMockingStrategy? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsMockingStrategyExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsNoMatchBehavior.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsNoMatchBehavior.g.cs deleted file mode 100644 index ccab43a..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsNoMatchBehavior.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsNoMatchBehaviorJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsNoMatchBehavior Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsNoMatchBehaviorExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsNoMatchBehavior)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsNoMatchBehavior); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsNoMatchBehavior value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsNoMatchBehaviorExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsNoMatchBehaviorNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsNoMatchBehaviorNullable.g.cs deleted file mode 100644 index 47ea6ce..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsNoMatchBehaviorNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsNoMatchBehaviorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsNoMatchBehavior? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsNoMatchBehaviorExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsNoMatchBehavior)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsNoMatchBehavior?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsNoMatchBehavior? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsNoMatchBehaviorExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsOAuthErrorError.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsOAuthErrorError.g.cs deleted file mode 100644 index 1abc001..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsOAuthErrorError.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsOAuthErrorErrorJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsOAuthErrorError Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsOAuthErrorErrorExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsOAuthErrorError)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsOAuthErrorError); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsOAuthErrorError value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsOAuthErrorErrorExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsOAuthErrorErrorNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsOAuthErrorErrorNullable.g.cs deleted file mode 100644 index 2cef1f1..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsOAuthErrorErrorNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsOAuthErrorErrorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsOAuthErrorError? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsOAuthErrorErrorExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsOAuthErrorError)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsOAuthErrorError?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsOAuthErrorError? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsOAuthErrorErrorExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsParameterCheckMode.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsParameterCheckMode.g.cs deleted file mode 100644 index 1e6d8d9..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsParameterCheckMode.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsParameterCheckModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsParameterCheckMode Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsParameterCheckModeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsParameterCheckMode)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsParameterCheckMode); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsParameterCheckMode value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsParameterCheckModeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsParameterCheckModeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsParameterCheckModeNullable.g.cs deleted file mode 100644 index bf00ec6..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsParameterCheckModeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsParameterCheckModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsParameterCheckMode? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsParameterCheckModeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsParameterCheckMode)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsParameterCheckMode?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsParameterCheckMode? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsParameterCheckModeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSimulationMessageRole.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSimulationMessageRole.g.cs deleted file mode 100644 index 35d8e3c..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSimulationMessageRole.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsSimulationMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsSimulationMessageRole Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsSimulationMessageRoleExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsSimulationMessageRole)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsSimulationMessageRole); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsSimulationMessageRole value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsSimulationMessageRoleExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSimulationMessageRoleNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSimulationMessageRoleNullable.g.cs deleted file mode 100644 index 197f070..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSimulationMessageRoleNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsSimulationMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsSimulationMessageRole? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsSimulationMessageRoleExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsSimulationMessageRole)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsSimulationMessageRole?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsSimulationMessageRole? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsSimulationMessageRoleExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSystemToolConfigBuiltin.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSystemToolConfigBuiltin.g.cs deleted file mode 100644 index 59c5609..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSystemToolConfigBuiltin.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsSystemToolConfigBuiltinJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsSystemToolConfigBuiltin Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsSystemToolConfigBuiltinExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsSystemToolConfigBuiltin)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsSystemToolConfigBuiltin); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsSystemToolConfigBuiltin value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsSystemToolConfigBuiltinExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSystemToolConfigBuiltinNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSystemToolConfigBuiltinNullable.g.cs deleted file mode 100644 index 8e5a701..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsSystemToolConfigBuiltinNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsSystemToolConfigBuiltinNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsSystemToolConfigBuiltin? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsSystemToolConfigBuiltinExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsSystemToolConfigBuiltin)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsSystemToolConfigBuiltin?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsSystemToolConfigBuiltin? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsSystemToolConfigBuiltinExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantDataRegion.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantDataRegion.g.cs deleted file mode 100644 index a123bc8..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantDataRegion.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTenantDataRegionJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTenantDataRegion Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTenantDataRegionExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTenantDataRegion)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTenantDataRegion); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTenantDataRegion value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsTenantDataRegionExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantDataRegionNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantDataRegionNullable.g.cs deleted file mode 100644 index 577f9e3..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantDataRegionNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTenantDataRegionNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTenantDataRegion? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTenantDataRegionExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTenantDataRegion)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTenantDataRegion?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTenantDataRegion? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsTenantDataRegionExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantPlan.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantPlan.g.cs deleted file mode 100644 index 2caa901..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantPlan.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTenantPlanJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTenantPlan Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTenantPlanExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTenantPlan)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTenantPlan); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTenantPlan value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsTenantPlanExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantPlanNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantPlanNullable.g.cs deleted file mode 100644 index b3ce4d1..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTenantPlanNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTenantPlanNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTenantPlan? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTenantPlanExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTenantPlan)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTenantPlan?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTenantPlan? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsTenantPlanExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestRunStatus.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestRunStatus.g.cs deleted file mode 100644 index 2a39341..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestRunStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTestRunStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTestRunStatus Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTestRunStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTestRunStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTestRunStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTestRunStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsTestRunStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestRunStatusNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestRunStatusNullable.g.cs deleted file mode 100644 index 0b77c18..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestRunStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTestRunStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTestRunStatus? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTestRunStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTestRunStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTestRunStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTestRunStatus? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsTestRunStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestType.g.cs deleted file mode 100644 index 41a0a93..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTestTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTestType Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTestTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTestType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTestType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTestType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsTestTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestTypeNullable.g.cs deleted file mode 100644 index 2036360..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsTestTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsTestTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsTestType? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsTestTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsTestType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsTestType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsTestType? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsTestTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolConfig.g.cs deleted file mode 100644 index f659f30..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolConfig.g.cs +++ /dev/null @@ -1,183 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Speechify.JsonConverters -{ - /// - public class TtsToolConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsToolConfig Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("builtin")) __score0++; - if (__jsonProps.Contains("builtin_config")) __score0++; - if (__jsonProps.Contains("params")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("headers")) __score1++; - if (__jsonProps.Contains("method")) __score1++; - if (__jsonProps.Contains("params")) __score1++; - if (__jsonProps.Contains("timeout_ms")) __score1++; - if (__jsonProps.Contains("url")) __score1++; - var __score2 = 0; - if (__jsonProps.Contains("params")) __score2++; - if (__jsonProps.Contains("timeout_ms")) __score2++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - global::Speechify.TtsSystemToolConfig? systemToolConfig = default; - global::Speechify.TtsWebhookToolConfig? webhookToolConfig = default; - global::Speechify.TtsClientToolConfig? clientToolConfig = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - systemToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - webhookToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 2) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - clientToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (systemToolConfig == null && webhookToolConfig == null && clientToolConfig == null) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - systemToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - webhookToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - clientToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.TtsToolConfig( - systemToolConfig, - - webhookToolConfig, - - clientToolConfig - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsToolConfig value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsSystemToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemToolConfig!, typeInfo); - } - else if (value.IsWebhookToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebhookToolConfig!, typeInfo); - } - else if (value.IsClientToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ClientToolConfig!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolParamType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolParamType.g.cs deleted file mode 100644 index f3b66f3..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolParamType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsToolParamTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsToolParamType Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsToolParamTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsToolParamType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsToolParamType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsToolParamType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsToolParamTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolParamTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolParamTypeNullable.g.cs deleted file mode 100644 index f3b4fbe..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsToolParamTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsToolParamTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsToolParamType? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsToolParamTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsToolParamType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsToolParamType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsToolParamType? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsToolParamTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsUpdateAgentTestRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsUpdateAgentTestRequestConfig.g.cs deleted file mode 100644 index 353f070..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsUpdateAgentTestRequestConfig.g.cs +++ /dev/null @@ -1,193 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Speechify.JsonConverters -{ - /// - public class TtsUpdateAgentTestRequestConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsUpdateAgentTestRequestConfig Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("context")) __score0++; - if (__jsonProps.Contains("failure_examples")) __score0++; - if (__jsonProps.Contains("first_message_override")) __score0++; - if (__jsonProps.Contains("initial_chat_history")) __score0++; - if (__jsonProps.Contains("model_override")) __score0++; - if (__jsonProps.Contains("success_criteria")) __score0++; - if (__jsonProps.Contains("success_examples")) __score0++; - if (__jsonProps.Contains("system_prompt_override")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("context")) __score1++; - if (__jsonProps.Contains("expected_tool")) __score1++; - if (__jsonProps.Contains("initial_chat_history")) __score1++; - if (__jsonProps.Contains("model_override")) __score1++; - if (__jsonProps.Contains("parameter_checks")) __score1++; - if (__jsonProps.Contains("system_prompt_override")) __score1++; - var __score2 = 0; - if (__jsonProps.Contains("initial_chat_history")) __score2++; - if (__jsonProps.Contains("max_turns")) __score2++; - if (__jsonProps.Contains("model_override")) __score2++; - if (__jsonProps.Contains("scenario")) __score2++; - if (__jsonProps.Contains("success_condition")) __score2++; - if (__jsonProps.Contains("system_prompt_override")) __score2++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - global::Speechify.TtsScenarioConfig? scenarioConfig = default; - global::Speechify.TtsToolCallConfig? toolCallConfig = default; - global::Speechify.TtsSimulationConfig? simulationConfig = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - scenarioConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - toolCallConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 2) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - simulationConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (scenarioConfig == null && toolCallConfig == null && simulationConfig == null) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - scenarioConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - toolCallConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - simulationConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.TtsUpdateAgentTestRequestConfig( - scenarioConfig, - - toolCallConfig, - - simulationConfig - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsUpdateAgentTestRequestConfig value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsScenarioConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsScenarioConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsScenarioConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ScenarioConfig!, typeInfo); - } - else if (value.IsToolCallConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsToolCallConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsToolCallConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallConfig!, typeInfo); - } - else if (value.IsSimulationConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSimulationConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSimulationConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SimulationConfig!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsUpdateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsUpdateToolRequestConfig.g.cs deleted file mode 100644 index 18ab1f0..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsUpdateToolRequestConfig.g.cs +++ /dev/null @@ -1,183 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Speechify.JsonConverters -{ - /// - public class TtsUpdateToolRequestConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsUpdateToolRequestConfig Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); - var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("builtin")) __score0++; - if (__jsonProps.Contains("builtin_config")) __score0++; - if (__jsonProps.Contains("params")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("headers")) __score1++; - if (__jsonProps.Contains("method")) __score1++; - if (__jsonProps.Contains("params")) __score1++; - if (__jsonProps.Contains("timeout_ms")) __score1++; - if (__jsonProps.Contains("url")) __score1++; - var __score2 = 0; - if (__jsonProps.Contains("params")) __score2++; - if (__jsonProps.Contains("timeout_ms")) __score2++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - global::Speechify.TtsSystemToolConfig? systemToolConfig = default; - global::Speechify.TtsWebhookToolConfig? webhookToolConfig = default; - global::Speechify.TtsClientToolConfig? clientToolConfig = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - systemToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - webhookToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 2) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - clientToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (systemToolConfig == null && webhookToolConfig == null && clientToolConfig == null) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - systemToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - webhookToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - clientToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::Speechify.TtsUpdateToolRequestConfig( - systemToolConfig, - - webhookToolConfig, - - clientToolConfig - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsUpdateToolRequestConfig value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsSystemToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsSystemToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsSystemToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemToolConfig!, typeInfo); - } - else if (value.IsWebhookToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsWebhookToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsWebhookToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebhookToolConfig!, typeInfo); - } - else if (value.IsClientToolConfig) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.TtsClientToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.TtsClientToolConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ClientToolConfig!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsWebhookToolConfigMethod.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsWebhookToolConfigMethod.g.cs deleted file mode 100644 index 5e36a40..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsWebhookToolConfigMethod.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsWebhookToolConfigMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsWebhookToolConfigMethod Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsWebhookToolConfigMethodExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsWebhookToolConfigMethod)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsWebhookToolConfigMethod); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsWebhookToolConfigMethod value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Speechify.TtsWebhookToolConfigMethodExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsWebhookToolConfigMethodNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsWebhookToolConfigMethodNullable.g.cs deleted file mode 100644 index e8d6225..0000000 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.TtsWebhookToolConfigMethodNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Speechify.JsonConverters -{ - /// - public sealed class TtsWebhookToolConfigMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Speechify.TtsWebhookToolConfigMethod? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Speechify.TtsWebhookToolConfigMethodExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Speechify.TtsWebhookToolConfigMethod)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Speechify.TtsWebhookToolConfigMethod?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Speechify.TtsWebhookToolConfigMethod? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Speechify.TtsWebhookToolConfigMethodExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs index 9df2818..fb71bbe 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs @@ -25,6 +25,10 @@ namespace Speechify typeof(global::Speechify.JsonConverters.TtsGetSpeechResponseAudioFormatNullableJsonConverter), + typeof(global::Speechify.JsonConverters.TtsErrorCodeJsonConverter), + + typeof(global::Speechify.JsonConverters.TtsErrorCodeNullableJsonConverter), + typeof(global::Speechify.JsonConverters.TtsV1AudioStreamPostParametersAcceptJsonConverter), typeof(global::Speechify.JsonConverters.TtsV1AudioStreamPostParametersAcceptNullableJsonConverter), @@ -33,26 +37,6 @@ namespace Speechify typeof(global::Speechify.JsonConverters.TtsGetStreamRequestModelNullableJsonConverter), - typeof(global::Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantTypeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantTypeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsCreateAccessTokenRequestScopeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsCreateAccessTokenRequestScopeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsAccessTokenScopeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsAccessTokenScopeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsAccessTokenTokenTypeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsAccessTokenTokenTypeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsOAuthErrorErrorJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsOAuthErrorErrorNullableJsonConverter), - typeof(global::Speechify.JsonConverters.TtsGetVoiceGenderJsonConverter), typeof(global::Speechify.JsonConverters.TtsGetVoiceGenderNullableJsonConverter), @@ -81,114 +65,6 @@ namespace Speechify typeof(global::Speechify.JsonConverters.TtsCreatedVoiceTypeNullableJsonConverter), - typeof(global::Speechify.JsonConverters.TtsToolKindJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsToolKindNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsSystemToolConfigBuiltinJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsSystemToolConfigBuiltinNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsToolParamTypeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsToolParamTypeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsWebhookToolConfigMethodJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsWebhookToolConfigMethodNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsDataCollectionFieldTypeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsDataCollectionFieldTypeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsDynamicVariableTypeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsDynamicVariableTypeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsConversationStatusJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsConversationStatusNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsConversationTransportJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsConversationTransportNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTestTypeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTestTypeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsSimulationMessageRoleJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsSimulationMessageRoleNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsParameterCheckModeJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsParameterCheckModeNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsMockingStrategyJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsMockingStrategyNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsNoMatchBehaviorJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsNoMatchBehaviorNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTestRunStatusJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTestRunStatusNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsMessageRoleJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsMessageRoleNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsEvaluationKindJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsEvaluationKindNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsEvaluationStatusJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsEvaluationStatusNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatusJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatusNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTenantPlanJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTenantPlanNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTenantDataRegionJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsTenantDataRegionNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsMemberRoleJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsMemberRoleNullableJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsToolConfigJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsAgentTestConfigJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsCreateAgentTestRequestConfigJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsUpdateAgentTestRequestConfigJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsCreateToolRequestConfigJsonConverter), - - typeof(global::Speechify.JsonConverters.TtsUpdateToolRequestConfigJsonConverter), - - typeof(global::Speechify.JsonConverters.OneOfJsonConverter), - - typeof(global::Speechify.JsonConverters.OneOfJsonConverter), - - typeof(global::Speechify.JsonConverters.OneOfJsonConverter), - - typeof(global::Speechify.JsonConverters.OneOfJsonConverter), - - typeof(global::Speechify.JsonConverters.OneOfJsonConverter), - - typeof(global::Speechify.JsonConverters.OneOfJsonConverter), - typeof(global::Speechify.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JsonSerializerContextTypes))] @@ -206,19 +82,14 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetSpeechResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsErrorCode), TypeInfoPropertyName = "TtsErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsV1AudioStreamPostParametersAccept), TypeInfoPropertyName = "TtsV1AudioStreamPostParametersAccept2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetStreamRequestModel), TypeInfoPropertyName = "TtsGetStreamRequestModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetStreamOptionsRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetStreamRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAudioStreamResponse200))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAccessTokenRequestGrantType), TypeInfoPropertyName = "TtsCreateAccessTokenRequestGrantType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAccessTokenRequestScope), TypeInfoPropertyName = "TtsCreateAccessTokenRequestScope2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAccessTokenRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAccessTokenScope), TypeInfoPropertyName = "TtsAccessTokenScope2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAccessTokenTokenType), TypeInfoPropertyName = "TtsAccessTokenTokenType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAccessToken))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsOAuthErrorError), TypeInfoPropertyName = "TtsOAuthErrorError2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsOAuthError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetVoiceGender), TypeInfoPropertyName = "TtsGetVoiceGender2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetVoiceLanguage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsGetVoicesModelName), TypeInfoPropertyName = "TtsGetVoicesModelName2")] @@ -237,201 +108,15 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreatedVoiceType), TypeInfoPropertyName = "TtsCreatedVoiceType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreatedVoice))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgent))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListAgentsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAgentRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateAgentRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolKind), TypeInfoPropertyName = "TtsToolKind2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSystemToolConfigBuiltin), TypeInfoPropertyName = "TtsSystemToolConfigBuiltin2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolParamType), TypeInfoPropertyName = "TtsToolParamType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolParam))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSystemToolConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsWebhookToolConfigMethod), TypeInfoPropertyName = "TtsWebhookToolConfigMethod2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsWebhookToolConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsClientToolConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolConfig), TypeInfoPropertyName = "TtsToolConfig2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTool))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListToolsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsEvaluationCriterion))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsDataCollectionFieldType), TypeInfoPropertyName = "TtsDataCollectionFieldType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsDataCollectionField))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsEvaluationConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateEvaluationConfigRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsDynamicVariableType), TypeInfoPropertyName = "TtsDynamicVariableType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsDynamicVariable))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSystemVariableDoc))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListDynamicVariablesResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateDynamicVariablesRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateConversationRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsConversationStatus), TypeInfoPropertyName = "TtsConversationStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsConversationTransport), TypeInfoPropertyName = "TtsConversationTransport2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsConversation))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateConversationResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateSessionRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsKnowledgeBase))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListKnowledgeBasesResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMemory))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListMemoriesResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsDeleteMemoriesByCallerRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsDeleteMemoriesByCallerResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTestType), TypeInfoPropertyName = "TtsTestType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSimulationMessageRole), TypeInfoPropertyName = "TtsSimulationMessageRole2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSimulationMessage))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsScenarioConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsParameterCheckMode), TypeInfoPropertyName = "TtsParameterCheckMode2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsParameterCheck))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolCallConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSimulationConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgentTestConfig), TypeInfoPropertyName = "TtsAgentTestConfig2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMockingStrategy), TypeInfoPropertyName = "TtsMockingStrategy2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolMock))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsNoMatchBehavior), TypeInfoPropertyName = "TtsNoMatchBehavior2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolMockConfig))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTestRunStatus), TypeInfoPropertyName = "TtsTestRunStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsScenarioResult))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsParameterCheckResult))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsToolCallResult))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSimulationToolCall))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSimulationResult))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTestRunResult))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OneOf), TypeInfoPropertyName = "OneOfTtsScenarioResultObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OneOf), TypeInfoPropertyName = "OneOfTtsToolCallResultObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OneOf), TypeInfoPropertyName = "OneOfTtsSimulationResultObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgentTestRun))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OneOf), TypeInfoPropertyName = "OneOfTtsTestRunResultObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgentTestWithLastRun))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OneOf), TypeInfoPropertyName = "OneOfTtsAgentTestRunObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListAgentTestsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAgentTestRequestConfig), TypeInfoPropertyName = "TtsCreateAgentTestRequestConfig2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAgentTestRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgentTest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsRunAgentTestsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateAgentTestRequestConfig), TypeInfoPropertyName = "TtsUpdateAgentTestRequestConfig2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateAgentTestRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListAgentTestRunsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListTestsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTestStatsBucket))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTestStats))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsBatchRunEntry))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsRunBatchRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsRunBatchResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgentTestAttachment))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListAgentTestAttachmentsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMoveAgentTestRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsAgentTestFolder))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListAgentTestFoldersResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateAgentTestFolderRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateAgentTestFolderRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateToolRequestConfig), TypeInfoPropertyName = "TtsCreateToolRequestConfig2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateToolRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateToolRequestConfig), TypeInfoPropertyName = "TtsUpdateToolRequestConfig2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateToolRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListConversationsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMessageRole), TypeInfoPropertyName = "TtsMessageRole2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMessage))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListMessagesResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsEvaluationKind), TypeInfoPropertyName = "TtsEvaluationKind2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsEvaluationStatus), TypeInfoPropertyName = "TtsEvaluationStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsEvaluation))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OneOf), TypeInfoPropertyName = "OneOfTtsEvaluationStatusObject2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListEvaluationsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateKnowledgeBaseRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateKnowledgeBaseRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsKnowledgeBaseDocumentStatus), TypeInfoPropertyName = "TtsKnowledgeBaseDocumentStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsKnowledgeBaseDocument))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListKnowledgeBaseDocumentsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsKnowledgeBaseChunk))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsListKnowledgeBaseChunksResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSearchKnowledgeBasesRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsKnowledgeBaseSearchHit))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsSearchKnowledgeBasesResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTenantPlan), TypeInfoPropertyName = "TtsTenantPlan2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTenantDataRegion), TypeInfoPropertyName = "TtsTenantDataRegion2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTenant))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTenantsListResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateWorkspaceRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateWorkspaceRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMemberRole), TypeInfoPropertyName = "TtsMemberRole2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMember))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsMembersListResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsUpdateMemberRoleRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsInvite))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsInvitesListResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsCreateInviteRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsInvitePreview))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TtsTransferOwnershipRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadDocumentRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs index ad50d39..23fb397 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs @@ -84,767 +84,119 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Speechify.TtsV1AudioStreamPostParametersAccept? Type14 { get; set; } + public global::Speechify.TtsErrorCode? Type14 { get; set; } /// /// /// - public global::Speechify.TtsGetStreamRequestModel? Type15 { get; set; } + public global::Speechify.TtsErrorDetail? Type15 { get; set; } /// /// /// - public global::Speechify.TtsGetStreamOptionsRequest? Type16 { get; set; } + public global::System.Collections.Generic.Dictionary? Type16 { get; set; } /// /// /// - public global::Speechify.TtsGetStreamRequest? Type17 { get; set; } + public global::Speechify.TtsError? Type17 { get; set; } /// /// /// - public global::Speechify.TtsAudioStreamResponse200? Type18 { get; set; } + public global::Speechify.TtsV1AudioStreamPostParametersAccept? Type18 { get; set; } /// /// /// - public global::Speechify.TtsCreateAccessTokenRequestGrantType? Type19 { get; set; } + public global::Speechify.TtsGetStreamRequestModel? Type19 { get; set; } /// /// /// - public global::Speechify.TtsCreateAccessTokenRequestScope? Type20 { get; set; } + public global::Speechify.TtsGetStreamOptionsRequest? Type20 { get; set; } /// /// /// - public global::Speechify.TtsCreateAccessTokenRequest? Type21 { get; set; } + public global::Speechify.TtsGetStreamRequest? Type21 { get; set; } /// /// /// - public global::Speechify.TtsAccessTokenScope? Type22 { get; set; } + public global::Speechify.TtsGetVoiceGender? Type22 { get; set; } /// /// /// - public global::Speechify.TtsAccessTokenTokenType? Type23 { get; set; } + public global::Speechify.TtsGetVoiceLanguage? Type23 { get; set; } /// /// /// - public global::Speechify.TtsAccessToken? Type24 { get; set; } + public global::Speechify.TtsGetVoicesModelName? Type24 { get; set; } /// /// /// - public global::Speechify.TtsOAuthErrorError? Type25 { get; set; } + public global::Speechify.TtsGetVoicesModel? Type25 { get; set; } /// /// /// - public global::Speechify.TtsOAuthError? Type26 { get; set; } + public global::System.Collections.Generic.IList? Type26 { get; set; } /// /// /// - public global::Speechify.TtsGetVoiceGender? Type27 { get; set; } + public global::Speechify.TtsGetVoiceType? Type27 { get; set; } /// /// /// - public global::Speechify.TtsGetVoiceLanguage? Type28 { get; set; } + public global::Speechify.TtsGetVoice? Type28 { get; set; } /// /// /// - public global::Speechify.TtsGetVoicesModelName? Type29 { get; set; } + public global::System.Collections.Generic.IList? Type29 { get; set; } /// /// /// - public global::Speechify.TtsGetVoicesModel? Type30 { get; set; } + public global::System.Collections.Generic.IList? Type30 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type31 { get; set; } + public global::Speechify.TtsV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender? Type31 { get; set; } /// /// /// - public global::Speechify.TtsGetVoiceType? Type32 { get; set; } + public global::Speechify.TtsCreatedVoiceGender? Type32 { get; set; } /// /// /// - public global::Speechify.TtsGetVoice? Type33 { get; set; } + public global::Speechify.TtsCreateVoiceLanguage? Type33 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type34 { get; set; } + public global::Speechify.TtsCreateVoiceModelName? Type34 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type35 { get; set; } + public global::Speechify.TtsCreateVoiceModel? Type35 { get; set; } /// /// /// - public global::Speechify.TtsV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender? Type36 { get; set; } + public global::System.Collections.Generic.IList? Type36 { get; set; } /// /// /// - public global::Speechify.TtsCreatedVoiceGender? Type37 { get; set; } + public global::Speechify.TtsCreatedVoiceType? Type37 { get; set; } /// /// /// - public global::Speechify.TtsCreateVoiceLanguage? Type38 { get; set; } + public global::Speechify.TtsCreatedVoice? Type38 { get; set; } /// /// /// - public global::Speechify.TtsCreateVoiceModelName? Type39 { get; set; } + public global::System.Collections.Generic.IList? Type39 { get; set; } /// /// /// - public global::Speechify.TtsCreateVoiceModel? Type40 { get; set; } + public global::Speechify.CreateRequest? Type40 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type41 { get; set; } + public global::System.Collections.Generic.IList? Type41 { get; set; } /// /// /// - public global::Speechify.TtsCreatedVoiceType? Type42 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreatedVoice? Type43 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type44 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgent? Type45 { get; set; } - /// - /// - /// - public object? Type46 { get; set; } - /// - /// - /// - public int? Type47 { get; set; } - /// - /// - /// - public global::System.DateTime? Type48 { get; set; } - /// - /// - /// - public global::Speechify.TtsListAgentsResponse? Type49 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type50 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateAgentRequest? Type51 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateAgentRequest? Type52 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolKind? Type53 { get; set; } - /// - /// - /// - public global::Speechify.TtsSystemToolConfigBuiltin? Type54 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolParamType? Type55 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolParam? Type56 { get; set; } - /// - /// - /// - public global::Speechify.TtsSystemToolConfig? Type57 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type58 { get; set; } - /// - /// - /// - public global::Speechify.TtsWebhookToolConfigMethod? Type59 { get; set; } - /// - /// - /// - public global::Speechify.TtsWebhookToolConfig? Type60 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.Dictionary? Type61 { get; set; } - /// - /// - /// - public global::Speechify.TtsClientToolConfig? Type62 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolConfig? Type63 { get; set; } - /// - /// - /// - public global::Speechify.TtsTool? Type64 { get; set; } - /// - /// - /// - public global::Speechify.TtsListToolsResponse? Type65 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type66 { get; set; } - /// - /// - /// - public global::Speechify.TtsEvaluationCriterion? Type67 { get; set; } - /// - /// - /// - public global::Speechify.TtsDataCollectionFieldType? Type68 { get; set; } - /// - /// - /// - public global::Speechify.TtsDataCollectionField? Type69 { get; set; } - /// - /// - /// - public global::Speechify.TtsEvaluationConfig? Type70 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type71 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type72 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateEvaluationConfigRequest? Type73 { get; set; } - /// - /// - /// - public global::Speechify.TtsDynamicVariableType? Type74 { get; set; } - /// - /// - /// - public global::Speechify.TtsDynamicVariable? Type75 { get; set; } - /// - /// - /// - public global::Speechify.TtsSystemVariableDoc? Type76 { get; set; } - /// - /// - /// - public global::Speechify.TtsListDynamicVariablesResponse? Type77 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type78 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type79 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateDynamicVariablesRequest? Type80 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateConversationRequest? Type81 { get; set; } - /// - /// - /// - public global::Speechify.TtsConversationStatus? Type82 { get; set; } - /// - /// - /// - public global::Speechify.TtsConversationTransport? Type83 { get; set; } - /// - /// - /// - public global::Speechify.TtsConversation? Type84 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateConversationResponse? Type85 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateSessionRequest? Type86 { get; set; } - /// - /// - /// - public global::Speechify.TtsKnowledgeBase? Type87 { get; set; } - /// - /// - /// - public global::Speechify.TtsListKnowledgeBasesResponse? Type88 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type89 { get; set; } - /// - /// - /// - public global::Speechify.TtsMemory? Type90 { get; set; } - /// - /// - /// - public global::Speechify.TtsListMemoriesResponse? Type91 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type92 { get; set; } - /// - /// - /// - public global::Speechify.TtsDeleteMemoriesByCallerRequest? Type93 { get; set; } - /// - /// - /// - public global::Speechify.TtsDeleteMemoriesByCallerResponse? Type94 { get; set; } - /// - /// - /// - public global::Speechify.TtsTestType? Type95 { get; set; } - /// - /// - /// - public global::Speechify.TtsSimulationMessageRole? Type96 { get; set; } - /// - /// - /// - public global::Speechify.TtsSimulationMessage? Type97 { get; set; } - /// - /// - /// - public global::Speechify.TtsScenarioConfig? Type98 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type99 { get; set; } - /// - /// - /// - public global::Speechify.TtsParameterCheckMode? Type100 { get; set; } - /// - /// - /// - public global::Speechify.TtsParameterCheck? Type101 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolCallConfig? Type102 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type103 { get; set; } - /// - /// - /// - public global::Speechify.TtsSimulationConfig? Type104 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgentTestConfig? Type105 { get; set; } - /// - /// - /// - public global::Speechify.TtsMockingStrategy? Type106 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolMock? Type107 { get; set; } - /// - /// - /// - public global::Speechify.TtsNoMatchBehavior? Type108 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolMockConfig? Type109 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type110 { get; set; } - /// - /// - /// - public global::Speechify.TtsTestRunStatus? Type111 { get; set; } - /// - /// - /// - public global::Speechify.TtsScenarioResult? Type112 { get; set; } - /// - /// - /// - public global::Speechify.TtsParameterCheckResult? Type113 { get; set; } - /// - /// - /// - public global::Speechify.TtsToolCallResult? Type114 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type115 { get; set; } - /// - /// - /// - public global::Speechify.TtsSimulationToolCall? Type116 { get; set; } - /// - /// - /// - public global::Speechify.TtsSimulationResult? Type117 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type118 { get; set; } - /// - /// - /// - public global::Speechify.TtsTestRunResult? Type119 { get; set; } - /// - /// - /// - public global::Speechify.OneOf? Type120 { get; set; } - /// - /// - /// - public global::Speechify.OneOf? Type121 { get; set; } - /// - /// - /// - public global::Speechify.OneOf? Type122 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgentTestRun? Type123 { get; set; } - /// - /// - /// - public global::Speechify.OneOf? Type124 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgentTestWithLastRun? Type125 { get; set; } - /// - /// - /// - public global::Speechify.OneOf? Type126 { get; set; } - /// - /// - /// - public global::Speechify.TtsListAgentTestsResponse? Type127 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type128 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateAgentTestRequestConfig? Type129 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateAgentTestRequest? Type130 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgentTest? Type131 { get; set; } - /// - /// - /// - public global::Speechify.TtsRunAgentTestsResponse? Type132 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type133 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateAgentTestRequestConfig? Type134 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateAgentTestRequest? Type135 { get; set; } - /// - /// - /// - public global::Speechify.TtsListAgentTestRunsResponse? Type136 { get; set; } - /// - /// - /// - public global::Speechify.TtsListTestsResponse? Type137 { get; set; } - /// - /// - /// - public global::Speechify.TtsTestStatsBucket? Type138 { get; set; } - /// - /// - /// - public global::Speechify.TtsTestStats? Type139 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type140 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.Dictionary? Type141 { get; set; } - /// - /// - /// - public global::Speechify.TtsBatchRunEntry? Type142 { get; set; } - /// - /// - /// - public global::Speechify.TtsRunBatchRequest? Type143 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type144 { get; set; } - /// - /// - /// - public global::Speechify.TtsRunBatchResponse? Type145 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgentTestAttachment? Type146 { get; set; } - /// - /// - /// - public global::Speechify.TtsListAgentTestAttachmentsResponse? Type147 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type148 { get; set; } - /// - /// - /// - public global::Speechify.TtsMoveAgentTestRequest? Type149 { get; set; } - /// - /// - /// - public global::Speechify.TtsAgentTestFolder? Type150 { get; set; } - /// - /// - /// - public global::Speechify.TtsListAgentTestFoldersResponse? Type151 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type152 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateAgentTestFolderRequest? Type153 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateAgentTestFolderRequest? Type154 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateToolRequestConfig? Type155 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateToolRequest? Type156 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateToolRequestConfig? Type157 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateToolRequest? Type158 { get; set; } - /// - /// - /// - public global::Speechify.TtsListConversationsResponse? Type159 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type160 { get; set; } - /// - /// - /// - public global::Speechify.TtsMessageRole? Type161 { get; set; } - /// - /// - /// - public global::Speechify.TtsMessage? Type162 { get; set; } - /// - /// - /// - public global::Speechify.TtsListMessagesResponse? Type163 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type164 { get; set; } - /// - /// - /// - public global::Speechify.TtsEvaluationKind? Type165 { get; set; } - /// - /// - /// - public global::Speechify.TtsEvaluationStatus? Type166 { get; set; } - /// - /// - /// - public global::Speechify.TtsEvaluation? Type167 { get; set; } - /// - /// - /// - public global::Speechify.OneOf? Type168 { get; set; } - /// - /// - /// - public global::Speechify.TtsListEvaluationsResponse? Type169 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type170 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateKnowledgeBaseRequest? Type171 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateKnowledgeBaseRequest? Type172 { get; set; } - /// - /// - /// - public global::Speechify.TtsKnowledgeBaseDocumentStatus? Type173 { get; set; } - /// - /// - /// - public global::Speechify.TtsKnowledgeBaseDocument? Type174 { get; set; } - /// - /// - /// - public global::Speechify.TtsListKnowledgeBaseDocumentsResponse? Type175 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type176 { get; set; } - /// - /// - /// - public global::Speechify.TtsKnowledgeBaseChunk? Type177 { get; set; } - /// - /// - /// - public global::Speechify.TtsListKnowledgeBaseChunksResponse? Type178 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type179 { get; set; } - /// - /// - /// - public global::Speechify.TtsSearchKnowledgeBasesRequest? Type180 { get; set; } - /// - /// - /// - public global::Speechify.TtsKnowledgeBaseSearchHit? Type181 { get; set; } - /// - /// - /// - public global::Speechify.TtsSearchKnowledgeBasesResponse? Type182 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type183 { get; set; } - /// - /// - /// - public global::Speechify.TtsTenantPlan? Type184 { get; set; } - /// - /// - /// - public global::Speechify.TtsTenantDataRegion? Type185 { get; set; } - /// - /// - /// - public global::Speechify.TtsTenant? Type186 { get; set; } - /// - /// - /// - public global::Speechify.TtsTenantsListResponse? Type187 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type188 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateWorkspaceRequest? Type189 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateWorkspaceRequest? Type190 { get; set; } - /// - /// - /// - public global::Speechify.TtsMemberRole? Type191 { get; set; } - /// - /// - /// - public global::Speechify.TtsMember? Type192 { get; set; } - /// - /// - /// - public global::Speechify.TtsMembersListResponse? Type193 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type194 { get; set; } - /// - /// - /// - public global::Speechify.TtsUpdateMemberRoleRequest? Type195 { get; set; } - /// - /// - /// - public global::Speechify.TtsInvite? Type196 { get; set; } - /// - /// - /// - public global::Speechify.TtsInvitesListResponse? Type197 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type198 { get; set; } - /// - /// - /// - public global::Speechify.TtsCreateInviteRequest? Type199 { get; set; } - /// - /// - /// - public global::Speechify.TtsInvitePreview? Type200 { get; set; } - /// - /// - /// - public global::Speechify.TtsTransferOwnershipRequest? Type201 { get; set; } - /// - /// - /// - public global::Speechify.CreateRequest? Type202 { get; set; } - /// - /// - /// - public global::Speechify.UploadDocumentRequest? Type203 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type204 { get; set; } + public object? Type42 { get; set; } /// /// @@ -873,122 +225,6 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType6 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType7 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType8 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType9 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType10 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType11 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType12 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType13 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType14 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType15 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType16 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType17 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType18 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType19 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType20 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType21 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType22 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType23 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType24 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType25 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType26 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType27 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType28 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType29 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType30 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType31 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType32 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType33 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType34 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType35 { get; set; } + public global::System.Collections.Generic.List? ListType6 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateRequest.g.cs index 3e7f16f..a8b9a12 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateRequest.g.cs @@ -136,5 +136,6 @@ public CreateRequest( public CreateRequest() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateRequest2.Json.g.cs deleted file mode 100644 index 6da1178..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class CreateRequest2 - { - /// - /// 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::Speechify.CreateRequest2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.CreateRequest2), - jsonSerializerContext) as global::Speechify.CreateRequest2; - } - - /// - /// 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::Speechify.CreateRequest2? 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::Speechify.CreateRequest2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CreateRequest2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.CreateRequest2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateRequest2.g.cs deleted file mode 100644 index 0ee6025..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class CreateRequest2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest3.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateRequest3.Json.g.cs deleted file mode 100644 index 9d4e41b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest3.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class CreateRequest3 - { - /// - /// 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::Speechify.CreateRequest3? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.CreateRequest3), - jsonSerializerContext) as global::Speechify.CreateRequest3; - } - - /// - /// 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::Speechify.CreateRequest3? 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::Speechify.CreateRequest3), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CreateRequest3; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.CreateRequest3.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateRequest3.g.cs deleted file mode 100644 index 0c8095f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateRequest3.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class CreateRequest3 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateResponse.g.cs deleted file mode 100644 index 810be8a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class CreateResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateResponse2.Json.g.cs deleted file mode 100644 index 78a7711..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class CreateResponse2 - { - /// - /// 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::Speechify.CreateResponse2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.CreateResponse2), - jsonSerializerContext) as global::Speechify.CreateResponse2; - } - - /// - /// 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::Speechify.CreateResponse2? 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::Speechify.CreateResponse2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CreateResponse2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.CreateResponse2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateResponse2.g.cs deleted file mode 100644 index 89284b5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class CreateResponse2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse.Json.g.cs similarity index 88% rename from src/libs/Speechify/Generated/Speechify.Models.CreateResponse.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.DeleteResponse.Json.g.cs index 69221d6..9ad564b 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateResponse.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class CreateResponse + public sealed partial class DeleteResponse { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.CreateResponse? FromJson( + public static global::Speechify.DeleteResponse? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.CreateResponse), - jsonSerializerContext) as global::Speechify.CreateResponse; + typeof(global::Speechify.DeleteResponse), + jsonSerializerContext) as global::Speechify.DeleteResponse; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Speechify.CreateResponse? FromJson( + public static global::Speechify.DeleteResponse? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Speechify.CreateResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CreateResponse; + typeof(global::Speechify.DeleteResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.DeleteResponse; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs.g.cs b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse.g.cs similarity index 90% rename from src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.DeleteResponse.g.cs index 61bc8b6..f986286 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse.g.cs @@ -6,7 +6,7 @@ namespace Speechify /// /// /// - public sealed partial class TtsMessageToolArgs + public sealed partial class DeleteResponse { /// @@ -14,5 +14,6 @@ public sealed partial class TtsMessageToolArgs /// [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.GetResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.GetResponse.Json.g.cs deleted file mode 100644 index 5817e9e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.GetResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class GetResponse - { - /// - /// 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::Speechify.GetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.GetResponse), - jsonSerializerContext) as global::Speechify.GetResponse; - } - - /// - /// 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::Speechify.GetResponse? 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::Speechify.GetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.GetResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.GetResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.GetResponse.g.cs deleted file mode 100644 index 400d66c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.GetResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class GetResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.GetResponse2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.GetResponse2.Json.g.cs deleted file mode 100644 index 681b34c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.GetResponse2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class GetResponse2 - { - /// - /// 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::Speechify.GetResponse2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.GetResponse2), - jsonSerializerContext) as global::Speechify.GetResponse2; - } - - /// - /// 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::Speechify.GetResponse2? 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::Speechify.GetResponse2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.GetResponse2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.GetResponse2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.GetResponse2.g.cs deleted file mode 100644 index 6addab8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.GetResponse2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class GetResponse2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ImportRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportRequest.Json.g.cs deleted file mode 100644 index befa14c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ImportRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class ImportRequest - { - /// - /// 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::Speechify.ImportRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.ImportRequest), - jsonSerializerContext) as global::Speechify.ImportRequest; - } - - /// - /// 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::Speechify.ImportRequest? 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::Speechify.ImportRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.ImportRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportRequest.g.cs deleted file mode 100644 index 102dda4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ImportRequest.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class ImportRequest - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ImportResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportResponse.Json.g.cs deleted file mode 100644 index cec9414..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ImportResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class ImportResponse - { - /// - /// 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::Speechify.ImportResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.ImportResponse), - jsonSerializerContext) as global::Speechify.ImportResponse; - } - - /// - /// 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::Speechify.ImportResponse? 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::Speechify.ImportResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.ImportResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportResponse.g.cs deleted file mode 100644 index 6a04c3f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ImportResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class ImportResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListResponse.Json.g.cs deleted file mode 100644 index 1986d41..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ListResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class ListResponse - { - /// - /// 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::Speechify.ListResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.ListResponse), - jsonSerializerContext) as global::Speechify.ListResponse; - } - - /// - /// 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::Speechify.ListResponse? 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::Speechify.ListResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ListResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.ListResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListResponse.g.cs deleted file mode 100644 index a378c32..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ListResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class ListResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListResponse2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListResponse2.Json.g.cs deleted file mode 100644 index f748d3e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ListResponse2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class ListResponse2 - { - /// - /// 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::Speechify.ListResponse2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.ListResponse2), - jsonSerializerContext) as global::Speechify.ListResponse2; - } - - /// - /// 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::Speechify.ListResponse2? 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::Speechify.ListResponse2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ListResponse2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.ListResponse2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListResponse2.g.cs deleted file mode 100644 index d70f09f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.ListResponse2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class ListResponse2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessToken.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAccessToken.Json.g.cs deleted file mode 100644 index b838783..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessToken.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAccessToken - { - /// - /// 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::Speechify.TtsAccessToken? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAccessToken), - jsonSerializerContext) as global::Speechify.TtsAccessToken; - } - - /// - /// 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::Speechify.TtsAccessToken? 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::Speechify.TtsAccessToken), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAccessToken; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAccessToken.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAccessToken.g.cs deleted file mode 100644 index 04c09f2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessToken.g.cs +++ /dev/null @@ -1,78 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsAccessToken - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("access_token")] - public string? AccessToken { get; set; } - - /// - /// Expiration time, in seconds from the issue time - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_in")] - public long? ExpiresIn { get; set; } - - /// - /// The scope, or a space-delimited list of scopes the token is issued for - /// - [global::System.Text.Json.Serialization.JsonPropertyName("scope")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsAccessTokenScopeJsonConverter))] - public global::Speechify.TtsAccessTokenScope? Scope { get; set; } - - /// - /// Token type - /// - [global::System.Text.Json.Serialization.JsonPropertyName("token_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsAccessTokenTokenTypeJsonConverter))] - public global::Speechify.TtsAccessTokenTokenType? TokenType { 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. - /// - /// - /// - /// Expiration time, in seconds from the issue time - /// - /// - /// The scope, or a space-delimited list of scopes the token is issued for - /// - /// - /// Token type - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAccessToken( - string? accessToken, - long? expiresIn, - global::Speechify.TtsAccessTokenScope? scope, - global::Speechify.TtsAccessTokenTokenType? tokenType) - { - this.AccessToken = accessToken; - this.ExpiresIn = expiresIn; - this.Scope = scope; - this.TokenType = tokenType; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAccessToken() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessTokenScope.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAccessTokenScope.g.cs deleted file mode 100644 index b6ab52a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessTokenScope.g.cs +++ /dev/null @@ -1,81 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// The scope, or a space-delimited list of scopes the token is issued for - /// - public enum TtsAccessTokenScope - { - /// - /// - /// - Audio_all, - /// - /// - /// - Audio_speech, - /// - /// - /// - Audio_stream, - /// - /// - /// - Voices_all, - /// - /// - /// - Voices_create, - /// - /// - /// - Voices_delete, - /// - /// - /// - Voices_read, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsAccessTokenScopeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsAccessTokenScope value) - { - return value switch - { - TtsAccessTokenScope.Audio_all => "audio:all", - TtsAccessTokenScope.Audio_speech => "audio:speech", - TtsAccessTokenScope.Audio_stream => "audio:stream", - TtsAccessTokenScope.Voices_all => "voices:all", - TtsAccessTokenScope.Voices_create => "voices:create", - TtsAccessTokenScope.Voices_delete => "voices:delete", - TtsAccessTokenScope.Voices_read => "voices:read", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsAccessTokenScope? ToEnum(string value) - { - return value switch - { - "audio:all" => TtsAccessTokenScope.Audio_all, - "audio:speech" => TtsAccessTokenScope.Audio_speech, - "audio:stream" => TtsAccessTokenScope.Audio_stream, - "voices:all" => TtsAccessTokenScope.Voices_all, - "voices:create" => TtsAccessTokenScope.Voices_create, - "voices:delete" => TtsAccessTokenScope.Voices_delete, - "voices:read" => TtsAccessTokenScope.Voices_read, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessTokenTokenType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAccessTokenTokenType.g.cs deleted file mode 100644 index e8702af..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAccessTokenTokenType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Token type - /// - public enum TtsAccessTokenTokenType - { - /// - /// - /// - Bearer, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsAccessTokenTokenTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsAccessTokenTokenType value) - { - return value switch - { - TtsAccessTokenTokenType.Bearer => "bearer", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsAccessTokenTokenType? ToEnum(string value) - { - return value switch - { - "bearer" => TtsAccessTokenTokenType.Bearer, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgent.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgent.Json.g.cs deleted file mode 100644 index b3d2a50..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgent.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgent - { - /// - /// 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::Speechify.TtsAgent? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgent), - jsonSerializerContext) as global::Speechify.TtsAgent; - } - - /// - /// 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::Speechify.TtsAgent? 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::Speechify.TtsAgent), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgent; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgent.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgent.g.cs deleted file mode 100644 index 9fea7ea..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgent.g.cs +++ /dev/null @@ -1,248 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsAgent - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("slug")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Slug { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public string? Prompt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_message")] - public string? FirstMessage { get; set; } - - /// - /// ISO 639-1 code, e.g. 'en'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("language")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Language { get; set; } - - /// - /// Chat model slug. Leave empty to use the Speechify default. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("llm_model")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string LlmModel { get; set; } - - /// - /// Speechify voice slug. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string VoiceId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Temperature { get; set; } - - /// - /// Free-form agent config JSON (evaluation_config is read via its own endpoint). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - public object? Config { get; set; } - - /// - /// When true, the `<speechify-agent>` web component can start a
- /// session against this agent without an API key, subject to
- /// the `allowed_origins` allowlist. When false (default), only
- /// authenticated callers can start sessions. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("is_public")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool IsPublic { get; set; } - - /// - /// Exact `Origin` header values (e.g. `https://example.com`)
- /// that are allowed to start public sessions. Empty array
- /// with `is_public = true` means any origin is accepted —
- /// intended for open demos. No subdomain wildcards. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("allowed_origins")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList AllowedOrigins { get; set; } - - /// - /// Optional per-agent hostname allowlist enforced at
- /// session-creation time. When set and non-empty, the
- /// `Origin` header's hostname must be an exact member.
- /// Bare hostnames only — no scheme, port, or path. Up to
- /// 10 entries. Omit (null) or leave empty for no
- /// enforcement (public agents accept any hostname). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("hostname_allowlist")] - public global::System.Collections.Generic.IList? HostnameAllowlist { get; set; } - - /// - /// When true, the post-call extractor writes durable facts about
- /// each caller; at conversation-start the retriever injects the
- /// top matches into the system prompt via the `{{memory}}`
- /// template variable. Defaults to false. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("memory_enabled")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool MemoryEnabled { get; set; } - - /// - /// Maximum age (in days) of memories kept and surfaced to the
- /// retriever. 0 disables the cap. Defaults to 90. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("memory_retention_days")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int MemoryRetentionDays { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// ISO 639-1 code, e.g. 'en'. - /// - /// - /// Chat model slug. Leave empty to use the Speechify default. - /// - /// - /// Speechify voice slug. - /// - /// - /// - /// When true, the `<speechify-agent>` web component can start a
- /// session against this agent without an API key, subject to
- /// the `allowed_origins` allowlist. When false (default), only
- /// authenticated callers can start sessions. - /// - /// - /// Exact `Origin` header values (e.g. `https://example.com`)
- /// that are allowed to start public sessions. Empty array
- /// with `is_public = true` means any origin is accepted —
- /// intended for open demos. No subdomain wildcards. - /// - /// - /// When true, the post-call extractor writes durable facts about
- /// each caller; at conversation-start the retriever injects the
- /// top matches into the system prompt via the `{{memory}}`
- /// template variable. Defaults to false. - /// - /// - /// Maximum age (in days) of memories kept and surfaced to the
- /// retriever. 0 disables the cap. Defaults to 90. - /// - /// - /// - /// - /// - /// - /// Free-form agent config JSON (evaluation_config is read via its own endpoint). - /// - /// - /// Optional per-agent hostname allowlist enforced at
- /// session-creation time. When set and non-empty, the
- /// `Origin` header's hostname must be an exact member.
- /// Bare hostnames only — no scheme, port, or path. Up to
- /// 10 entries. Omit (null) or leave empty for no
- /// enforcement (public agents accept any hostname). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAgent( - string id, - string name, - string slug, - string language, - string llmModel, - string voiceId, - double temperature, - bool isPublic, - global::System.Collections.Generic.IList allowedOrigins, - bool memoryEnabled, - int memoryRetentionDays, - global::System.DateTime createdAt, - global::System.DateTime updatedAt, - string? prompt, - string? firstMessage, - object? config, - global::System.Collections.Generic.IList? hostnameAllowlist) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Slug = slug ?? throw new global::System.ArgumentNullException(nameof(slug)); - this.Prompt = prompt; - this.FirstMessage = firstMessage; - this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language)); - this.LlmModel = llmModel ?? throw new global::System.ArgumentNullException(nameof(llmModel)); - this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); - this.Temperature = temperature; - this.Config = config; - this.IsPublic = isPublic; - this.AllowedOrigins = allowedOrigins ?? throw new global::System.ArgumentNullException(nameof(allowedOrigins)); - this.HostnameAllowlist = hostnameAllowlist; - this.MemoryEnabled = memoryEnabled; - this.MemoryRetentionDays = memoryRetentionDays; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAgent() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig.Json.g.cs deleted file mode 100644 index 043b99d..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentConfig - { - /// - /// 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::Speechify.TtsAgentConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentConfig), - jsonSerializerContext) as global::Speechify.TtsAgentConfig; - } - - /// - /// 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::Speechify.TtsAgentConfig? 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::Speechify.TtsAgentConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig.g.cs deleted file mode 100644 index ec07da9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Free-form agent config JSON (evaluation_config is read via its own endpoint). - /// - public sealed partial class TtsAgentConfig - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig2.Json.g.cs deleted file mode 100644 index 50989a8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentConfig2 - { - /// - /// 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::Speechify.TtsAgentConfig2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentConfig2), - jsonSerializerContext) as global::Speechify.TtsAgentConfig2; - } - - /// - /// 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::Speechify.TtsAgentConfig2? 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::Speechify.TtsAgentConfig2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentConfig2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentConfig2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig2.g.cs deleted file mode 100644 index ea7e3ad..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentConfig2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsAgentConfig2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTest.Json.g.cs deleted file mode 100644 index 7c1cd93..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTest - { - /// - /// 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::Speechify.TtsAgentTest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTest), - jsonSerializerContext) as global::Speechify.TtsAgentTest; - } - - /// - /// 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::Speechify.TtsAgentTest? 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::Speechify.TtsAgentTest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTest.g.cs deleted file mode 100644 index 650ee5b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTest.g.cs +++ /dev/null @@ -1,165 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A configured test against a voice agent. `config` is a
- /// type-specific document - see `ScenarioConfig`, `ToolCallConfig`,
- /// and `SimulationConfig` for the per-type shapes (discriminated by `type`). - ///
- public sealed partial class TtsAgentTest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTestTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTestType Type { get; set; } - - /// - /// Type-specific configuration document. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsAgentTestConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsAgentTestConfig Config { get; set; } - - /// - /// Optional tool-mocking config applied during runs of this test. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_mock_config")] - public global::Speechify.TtsToolMockConfig? ToolMockConfig { get; set; } - - /// - /// Per-test dynamic-variable overrides. Keys substitute `{{key}}`
- /// placeholders inside the test config at run-start. Unknown keys
- /// render as empty string, matching session dispatch behaviour. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("variables")] - public object? Variables { get; set; } - - /// - /// Folder the test belongs to; null = root (unfiled). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] - public string? FolderId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - /// - /// - /// Type-specific configuration document. - /// - /// - /// - /// - /// Optional tool-mocking config applied during runs of this test. - /// - /// - /// Per-test dynamic-variable overrides. Keys substitute `{{key}}`
- /// placeholders inside the test config at run-start. Unknown keys
- /// render as empty string, matching session dispatch behaviour. - /// - /// - /// Folder the test belongs to; null = root (unfiled). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAgentTest( - string id, - string agentId, - string name, - string description, - global::Speechify.TtsTestType type, - global::Speechify.TtsAgentTestConfig config, - global::System.DateTime createdAt, - global::System.DateTime updatedAt, - global::Speechify.TtsToolMockConfig? toolMockConfig, - object? variables, - string? folderId) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Type = type; - this.Config = config; - this.ToolMockConfig = toolMockConfig; - this.Variables = variables; - this.FolderId = folderId; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAgentTest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestAttachment.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestAttachment.Json.g.cs deleted file mode 100644 index ca06446..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestAttachment.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestAttachment - { - /// - /// 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::Speechify.TtsAgentTestAttachment? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestAttachment), - jsonSerializerContext) as global::Speechify.TtsAgentTestAttachment; - } - - /// - /// 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::Speechify.TtsAgentTestAttachment? 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::Speechify.TtsAgentTestAttachment), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestAttachment; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestAttachment.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestAttachment.g.cs deleted file mode 100644 index ed5e852..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestAttachment.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One (test, agent) pair. Poll the `attached_agent_ids` field on `AgentTestWithLastRun` or hit `/v1/tests/{id}/attachments` for the authoritative set. - /// - public sealed partial class TtsAgentTestAttachment - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("test_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string TestId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAgentTestAttachment( - string testId, - string agentId, - global::System.DateTime createdAt) - { - this.TestId = testId ?? throw new global::System.ArgumentNullException(nameof(testId)); - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.CreatedAt = createdAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAgentTestAttachment() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestConfig.Json.g.cs deleted file mode 100644 index 9373ff6..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct TtsAgentTestConfig - { - /// - /// 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::Speechify.TtsAgentTestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestConfig), - jsonSerializerContext) as global::Speechify.TtsAgentTestConfig?; - } - - /// - /// 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::Speechify.TtsAgentTestConfig? 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::Speechify.TtsAgentTestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestConfig?; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestConfig.g.cs deleted file mode 100644 index 1b0e340..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestConfig.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Speechify -{ - /// - /// Type-specific configuration document. - /// - public readonly partial struct TtsAgentTestConfig : global::System.IEquatable - { - /// - /// Configuration for a `scenario` test. The runner sends `context` as
- /// a user message and asks an LLM judge to evaluate the agent response
- /// against `success_criteria`. Optional few-shot examples sharpen the
- /// judge's calibration. Use `initial_chat_history` to prepend prior
- /// turns before `context`; when the history already ends with a user
- /// message, `context` may be omitted and the agent is evaluated on
- /// its reply to that last history turn. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsScenarioConfig? ScenarioConfig { get; init; } -#else - public global::Speechify.TtsScenarioConfig? ScenarioConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScenarioConfig))] -#endif - public bool IsScenarioConfig => ScenarioConfig != null; - - /// - /// Configuration for a `tool` test. The runner sends `context` as a
- /// user message and asserts that the agent calls `expected_tool` with
- /// arguments matching all `parameter_checks`. Use
- /// `initial_chat_history` to test tool invocations that only make
- /// sense mid-conversation. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsToolCallConfig? ToolCallConfig { get; init; } -#else - public global::Speechify.TtsToolCallConfig? ToolCallConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallConfig))] -#endif - public bool IsToolCallConfig => ToolCallConfig != null; - - /// - /// Configuration for a `simulation` test. An AI caller drives a
- /// multi-turn conversation with the agent according to `scenario`.
- /// After `max_turns` exchanges (or when the agent ends the call), an
- /// LLM judge evaluates whether `success_condition` was met.
- /// Use `initial_chat_history` to seed the conversation at a specific
- /// mid-flow state. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsSimulationConfig? SimulationConfig { get; init; } -#else - public global::Speechify.TtsSimulationConfig? SimulationConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SimulationConfig))] -#endif - public bool IsSimulationConfig => SimulationConfig != null; - /// - /// - /// - public static implicit operator TtsAgentTestConfig(global::Speechify.TtsScenarioConfig value) => new TtsAgentTestConfig((global::Speechify.TtsScenarioConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsScenarioConfig?(TtsAgentTestConfig @this) => @this.ScenarioConfig; - - /// - /// - /// - public TtsAgentTestConfig(global::Speechify.TtsScenarioConfig? value) - { - ScenarioConfig = value; - } - - /// - /// - /// - public static implicit operator TtsAgentTestConfig(global::Speechify.TtsToolCallConfig value) => new TtsAgentTestConfig((global::Speechify.TtsToolCallConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsToolCallConfig?(TtsAgentTestConfig @this) => @this.ToolCallConfig; - - /// - /// - /// - public TtsAgentTestConfig(global::Speechify.TtsToolCallConfig? value) - { - ToolCallConfig = value; - } - - /// - /// - /// - public static implicit operator TtsAgentTestConfig(global::Speechify.TtsSimulationConfig value) => new TtsAgentTestConfig((global::Speechify.TtsSimulationConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsSimulationConfig?(TtsAgentTestConfig @this) => @this.SimulationConfig; - - /// - /// - /// - public TtsAgentTestConfig(global::Speechify.TtsSimulationConfig? value) - { - SimulationConfig = value; - } - - /// - /// - /// - public TtsAgentTestConfig( - global::Speechify.TtsScenarioConfig? scenarioConfig, - global::Speechify.TtsToolCallConfig? toolCallConfig, - global::Speechify.TtsSimulationConfig? simulationConfig - ) - { - ScenarioConfig = scenarioConfig; - ToolCallConfig = toolCallConfig; - SimulationConfig = simulationConfig; - } - - /// - /// - /// - public object? Object => - SimulationConfig as object ?? - ToolCallConfig as object ?? - ScenarioConfig as object - ; - - /// - /// - /// - public override string? ToString() => - ScenarioConfig?.ToString() ?? - ToolCallConfig?.ToString() ?? - SimulationConfig?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsScenarioConfig && !IsToolCallConfig && !IsSimulationConfig || !IsScenarioConfig && IsToolCallConfig && !IsSimulationConfig || !IsScenarioConfig && !IsToolCallConfig && IsSimulationConfig; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? scenarioConfig = null, - global::System.Func? toolCallConfig = null, - global::System.Func? simulationConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsScenarioConfig && scenarioConfig != null) - { - return scenarioConfig(ScenarioConfig!); - } - else if (IsToolCallConfig && toolCallConfig != null) - { - return toolCallConfig(ToolCallConfig!); - } - else if (IsSimulationConfig && simulationConfig != null) - { - return simulationConfig(SimulationConfig!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? scenarioConfig = null, - global::System.Action? toolCallConfig = null, - global::System.Action? simulationConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsScenarioConfig) - { - scenarioConfig?.Invoke(ScenarioConfig!); - } - else if (IsToolCallConfig) - { - toolCallConfig?.Invoke(ToolCallConfig!); - } - else if (IsSimulationConfig) - { - simulationConfig?.Invoke(SimulationConfig!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ScenarioConfig, - typeof(global::Speechify.TtsScenarioConfig), - ToolCallConfig, - typeof(global::Speechify.TtsToolCallConfig), - SimulationConfig, - typeof(global::Speechify.TtsSimulationConfig), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TtsAgentTestConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ScenarioConfig, other.ScenarioConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallConfig, other.ToolCallConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(SimulationConfig, other.SimulationConfig) - ; - } - - /// - /// - /// - public static bool operator ==(TtsAgentTestConfig obj1, TtsAgentTestConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TtsAgentTestConfig obj1, TtsAgentTestConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TtsAgentTestConfig o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestFolder.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestFolder.Json.g.cs deleted file mode 100644 index c593b2c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestFolder.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestFolder - { - /// - /// 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::Speechify.TtsAgentTestFolder? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestFolder), - jsonSerializerContext) as global::Speechify.TtsAgentTestFolder; - } - - /// - /// 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::Speechify.TtsAgentTestFolder? 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::Speechify.TtsAgentTestFolder), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestFolder; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestFolder.g.cs deleted file mode 100644 index c42684a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestFolder.g.cs +++ /dev/null @@ -1,83 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One organisational node in the per-owner tests tree. - /// - public sealed partial class TtsAgentTestFolder - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parent_folder_id")] - public string? ParentFolderId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAgentTestFolder( - string id, - string name, - global::System.DateTime createdAt, - global::System.DateTime updatedAt, - string? parentFolderId) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.ParentFolderId = parentFolderId; - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAgentTestFolder() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestRun.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestRun.Json.g.cs deleted file mode 100644 index 56a82d7..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestRun.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestRun - { - /// - /// 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::Speechify.TtsAgentTestRun? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestRun), - jsonSerializerContext) as global::Speechify.TtsAgentTestRun; - } - - /// - /// 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::Speechify.TtsAgentTestRun? 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::Speechify.TtsAgentTestRun), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestRun; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestRun.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestRun.g.cs deleted file mode 100644 index 3779288..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestRun.g.cs +++ /dev/null @@ -1,140 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One execution of a test. `result` is populated when `status`
- /// reaches a terminal state (`passed`, `failed`, or `error`).
- /// See `TestRunResult` for the shape. - ///
- public sealed partial class TtsAgentTestRun - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("test_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string TestId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// Lifecycle of a test run: `queued` - `running` - terminal.
- /// Terminal states:
- /// - `passed` - the agent behaviour met the success criteria.
- /// - `failed` - the agent behaviour did not meet the success criteria.
- /// - `error` - the runner itself could not complete (LLM outage, network error, etc.),
- /// distinct from `failed` which means the agent behaviour was judged and found lacking. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTestRunStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTestRunStatus Status { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("started_at")] - public global::System.DateTime? StartedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] - public global::System.DateTime? CompletedAt { get; set; } - - /// - /// Populated on terminal status only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("result")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OneOfJsonConverter))] - public global::Speechify.OneOf? Result { get; set; } - - /// - /// Human-readable error message when status is `error`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public string? Error { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { 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. - /// - /// - /// - /// - /// - /// Lifecycle of a test run: `queued` - `running` - terminal.
- /// Terminal states:
- /// - `passed` - the agent behaviour met the success criteria.
- /// - `failed` - the agent behaviour did not meet the success criteria.
- /// - `error` - the runner itself could not complete (LLM outage, network error, etc.),
- /// distinct from `failed` which means the agent behaviour was judged and found lacking. - /// - /// - /// - /// - /// - /// Populated on terminal status only. - /// - /// - /// Human-readable error message when status is `error`. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAgentTestRun( - string id, - string testId, - string agentId, - global::Speechify.TtsTestRunStatus status, - global::System.DateTime createdAt, - global::System.DateTime? startedAt, - global::System.DateTime? completedAt, - global::Speechify.OneOf? result, - string? error) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.TestId = testId ?? throw new global::System.ArgumentNullException(nameof(testId)); - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.Status = status; - this.StartedAt = startedAt; - this.CompletedAt = completedAt; - this.Result = result; - this.Error = error; - this.CreatedAt = createdAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAgentTestRun() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables.Json.g.cs deleted file mode 100644 index a3a0b34..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestVariables - { - /// - /// 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::Speechify.TtsAgentTestVariables? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestVariables), - jsonSerializerContext) as global::Speechify.TtsAgentTestVariables; - } - - /// - /// 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::Speechify.TtsAgentTestVariables? 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::Speechify.TtsAgentTestVariables), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestVariables; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestVariables.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables.g.cs deleted file mode 100644 index 21af568..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables.g.cs +++ /dev/null @@ -1,20 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Per-test dynamic-variable overrides. Keys substitute `{{key}}`
- /// placeholders inside the test config at run-start. Unknown keys
- /// render as empty string, matching session dispatch behaviour. - ///
- public sealed partial class TtsAgentTestVariables - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables2.Json.g.cs deleted file mode 100644 index e7b512f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestVariables2 - { - /// - /// 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::Speechify.TtsAgentTestVariables2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestVariables2), - jsonSerializerContext) as global::Speechify.TtsAgentTestVariables2; - } - - /// - /// 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::Speechify.TtsAgentTestVariables2? 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::Speechify.TtsAgentTestVariables2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestVariables2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestVariables2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables2.g.cs deleted file mode 100644 index 33464fc..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestVariables2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsAgentTestVariables2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRun.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRun.Json.g.cs deleted file mode 100644 index bdb7d80..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRun.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestWithLastRun - { - /// - /// 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::Speechify.TtsAgentTestWithLastRun? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestWithLastRun), - jsonSerializerContext) as global::Speechify.TtsAgentTestWithLastRun; - } - - /// - /// 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::Speechify.TtsAgentTestWithLastRun? 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::Speechify.TtsAgentTestWithLastRun), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestWithLastRun; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRun.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRun.g.cs deleted file mode 100644 index f3b21c5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRun.g.cs +++ /dev/null @@ -1,190 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// List-view projection of a test that includes the most recent run
- /// so the console can display pass/fail badges without an extra
- /// round-trip. On the global `/v1/tests` surface, also carries
- /// `attached_agent_ids` so the row can render agent chips without a
- /// follow-up request. - ///
- public sealed partial class TtsAgentTestWithLastRun - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTestTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTestType Type { get; set; } - - /// - /// Type-specific configuration document. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsAgentTestConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsAgentTestConfig Config { get; set; } - - /// - /// Optional tool-mocking config applied during runs of this test. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_mock_config")] - public global::Speechify.TtsToolMockConfig? ToolMockConfig { get; set; } - - /// - /// Per-test dynamic-variable overrides. Keys substitute `{{key}}`
- /// placeholders inside the test config at run-start. Unknown keys
- /// render as empty string, matching session dispatch behaviour. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("variables")] - public object? Variables { get; set; } - - /// - /// Folder the test belongs to; null = root (unfiled). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] - public string? FolderId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// The most recent run, or null if the test has never been run. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("last_run")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OneOfJsonConverter))] - public global::Speechify.OneOf? LastRun { get; set; } - - /// - /// Every agent this test runs against. Always includes the owner agent. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("attached_agent_ids")] - public global::System.Collections.Generic.IList? AttachedAgentIds { 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. - /// - /// - /// - /// - /// - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - /// - /// - /// Type-specific configuration document. - /// - /// - /// - /// - /// Optional tool-mocking config applied during runs of this test. - /// - /// - /// Per-test dynamic-variable overrides. Keys substitute `{{key}}`
- /// placeholders inside the test config at run-start. Unknown keys
- /// render as empty string, matching session dispatch behaviour. - /// - /// - /// Folder the test belongs to; null = root (unfiled). - /// - /// - /// The most recent run, or null if the test has never been run. - /// - /// - /// Every agent this test runs against. Always includes the owner agent. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsAgentTestWithLastRun( - string id, - string agentId, - string name, - string description, - global::Speechify.TtsTestType type, - global::Speechify.TtsAgentTestConfig config, - global::System.DateTime createdAt, - global::System.DateTime updatedAt, - global::Speechify.TtsToolMockConfig? toolMockConfig, - object? variables, - string? folderId, - global::Speechify.OneOf? lastRun, - global::System.Collections.Generic.IList? attachedAgentIds) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Type = type; - this.Config = config; - this.ToolMockConfig = toolMockConfig; - this.Variables = variables; - this.FolderId = folderId; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.LastRun = lastRun; - this.AttachedAgentIds = attachedAgentIds; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsAgentTestWithLastRun() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables.Json.g.cs deleted file mode 100644 index 84cb4ea..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestWithLastRunVariables - { - /// - /// 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::Speechify.TtsAgentTestWithLastRunVariables? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestWithLastRunVariables), - jsonSerializerContext) as global::Speechify.TtsAgentTestWithLastRunVariables; - } - - /// - /// 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::Speechify.TtsAgentTestWithLastRunVariables? 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::Speechify.TtsAgentTestWithLastRunVariables), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestWithLastRunVariables; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables2.Json.g.cs deleted file mode 100644 index 4dbc714..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAgentTestWithLastRunVariables2 - { - /// - /// 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::Speechify.TtsAgentTestWithLastRunVariables2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAgentTestWithLastRunVariables2), - jsonSerializerContext) as global::Speechify.TtsAgentTestWithLastRunVariables2; - } - - /// - /// 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::Speechify.TtsAgentTestWithLastRunVariables2? 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::Speechify.TtsAgentTestWithLastRunVariables2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAgentTestWithLastRunVariables2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables2.g.cs deleted file mode 100644 index b4ec3f9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsAgentTestWithLastRunVariables2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAudioStreamResponse200.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAudioStreamResponse200.Json.g.cs deleted file mode 100644 index 3815e3b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAudioStreamResponse200.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsAudioStreamResponse200 - { - /// - /// 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::Speechify.TtsAudioStreamResponse200? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsAudioStreamResponse200), - jsonSerializerContext) as global::Speechify.TtsAudioStreamResponse200; - } - - /// - /// 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::Speechify.TtsAudioStreamResponse200? 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::Speechify.TtsAudioStreamResponse200), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsAudioStreamResponse200; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsAudioStreamResponse200.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsAudioStreamResponse200.g.cs deleted file mode 100644 index 83de21a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAudioStreamResponse200.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Empty response body - /// - public sealed partial class TtsAudioStreamResponse200 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsBatchRunEntry.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsBatchRunEntry.Json.g.cs deleted file mode 100644 index 37be9a8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsBatchRunEntry.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsBatchRunEntry - { - /// - /// 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::Speechify.TtsBatchRunEntry? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsBatchRunEntry), - jsonSerializerContext) as global::Speechify.TtsBatchRunEntry; - } - - /// - /// 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::Speechify.TtsBatchRunEntry? 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::Speechify.TtsBatchRunEntry), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsBatchRunEntry; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsBatchRunEntry.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsBatchRunEntry.g.cs deleted file mode 100644 index 488a86c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsBatchRunEntry.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One entry in a batch-run request. Omit `agent_id` to fan out to
- /// every agent the test is attached to. - ///
- public sealed partial class TtsBatchRunEntry - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("test_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string TestId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - public string? AgentId { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsBatchRunEntry( - string testId, - string? agentId) - { - this.TestId = testId ?? throw new global::System.ArgumentNullException(nameof(testId)); - this.AgentId = agentId; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsBatchRunEntry() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsClientToolConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsClientToolConfig.Json.g.cs deleted file mode 100644 index a79dc66..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsClientToolConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsClientToolConfig - { - /// - /// 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::Speechify.TtsClientToolConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsClientToolConfig), - jsonSerializerContext) as global::Speechify.TtsClientToolConfig; - } - - /// - /// 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::Speechify.TtsClientToolConfig? 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::Speechify.TtsClientToolConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsClientToolConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsClientToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsClientToolConfig.g.cs deleted file mode 100644 index 816ebd4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsClientToolConfig.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Config shape for `kind=client`. Execution happens in the caller's browser / SDK. - /// - public sealed partial class TtsClientToolConfig - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("params")] - public global::System.Collections.Generic.IList? Params { get; set; } - - /// - /// Default Value: 10000 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("timeout_ms")] - public int? TimeoutMs { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Default Value: 10000 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsClientToolConfig( - global::System.Collections.Generic.IList? @params, - int? timeoutMs) - { - this.Params = @params; - this.TimeoutMs = timeoutMs; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsClientToolConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsConversation.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversation.Json.g.cs deleted file mode 100644 index f6fa6a1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversation.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsConversation - { - /// - /// 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::Speechify.TtsConversation? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsConversation), - jsonSerializerContext) as global::Speechify.TtsConversation; - } - - /// - /// 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::Speechify.TtsConversation? 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::Speechify.TtsConversation), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsConversation; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsConversation.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversation.g.cs deleted file mode 100644 index 9fb5c97..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversation.g.cs +++ /dev/null @@ -1,157 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsConversation - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("room_name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string RoomName { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("room_sid")] - public string? RoomSid { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsConversationStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsConversationStatus Status { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transport")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsConversationTransportJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsConversationTransport Transport { get; set; } - - /// - /// Set when the first user participant joins the realtime
- /// voice session. Null between CreateConversation and the
- /// participant-joined event, and stays null if no user ever
- /// joins. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("started_at")] - public global::System.DateTime? StartedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("ended_at")] - public global::System.DateTime? EndedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")] - public int? DurationMs { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("cost_cents")] - public int? CostCents { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("recording_url")] - public string? RecordingUrl { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] - public object? Metadata { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// - /// - /// - /// Set when the first user participant joins the realtime
- /// voice session. Null between CreateConversation and the
- /// participant-joined event, and stays null if no user ever
- /// joins. - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsConversation( - string id, - string agentId, - string roomName, - global::Speechify.TtsConversationStatus status, - global::Speechify.TtsConversationTransport transport, - string? roomSid, - global::System.DateTime? startedAt, - global::System.DateTime? endedAt, - int? durationMs, - int? costCents, - string? recordingUrl, - object? metadata) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.RoomName = roomName ?? throw new global::System.ArgumentNullException(nameof(roomName)); - this.RoomSid = roomSid; - this.Status = status; - this.Transport = transport; - this.StartedAt = startedAt; - this.EndedAt = endedAt; - this.DurationMs = durationMs; - this.CostCents = costCents; - this.RecordingUrl = recordingUrl; - this.Metadata = metadata; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsConversation() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata.Json.g.cs deleted file mode 100644 index 2924f21..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsConversationMetadata - { - /// - /// 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::Speechify.TtsConversationMetadata? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsConversationMetadata), - jsonSerializerContext) as global::Speechify.TtsConversationMetadata; - } - - /// - /// 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::Speechify.TtsConversationMetadata? 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::Speechify.TtsConversationMetadata), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsConversationMetadata; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsConversationMetadata.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata.g.cs deleted file mode 100644 index 2fc674c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsConversationMetadata - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata2.Json.g.cs deleted file mode 100644 index bf58822..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsConversationMetadata2 - { - /// - /// 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::Speechify.TtsConversationMetadata2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsConversationMetadata2), - jsonSerializerContext) as global::Speechify.TtsConversationMetadata2; - } - - /// - /// 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::Speechify.TtsConversationMetadata2? 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::Speechify.TtsConversationMetadata2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsConversationMetadata2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsConversationMetadata2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata2.g.cs deleted file mode 100644 index 4deef97..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationMetadata2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsConversationMetadata2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationStatus.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversationStatus.g.cs deleted file mode 100644 index 6463d41..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationStatus.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsConversationStatus - { - /// - /// - /// - Active, - /// - /// - /// - Completed, - /// - /// - /// - Failed, - /// - /// - /// - Pending, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsConversationStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsConversationStatus value) - { - return value switch - { - TtsConversationStatus.Active => "active", - TtsConversationStatus.Completed => "completed", - TtsConversationStatus.Failed => "failed", - TtsConversationStatus.Pending => "pending", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsConversationStatus? ToEnum(string value) - { - return value switch - { - "active" => TtsConversationStatus.Active, - "completed" => TtsConversationStatus.Completed, - "failed" => TtsConversationStatus.Failed, - "pending" => TtsConversationStatus.Pending, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationTransport.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsConversationTransport.g.cs deleted file mode 100644 index 415a25a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsConversationTransport.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsConversationTransport - { - /// - /// - /// - Sip, - /// - /// - /// - Web, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsConversationTransportExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsConversationTransport value) - { - return value switch - { - TtsConversationTransport.Sip => "sip", - TtsConversationTransport.Web => "web", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsConversationTransport? ToEnum(string value) - { - return value switch - { - "sip" => TtsConversationTransport.Sip, - "web" => TtsConversationTransport.Web, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequest.Json.g.cs deleted file mode 100644 index a748565..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAccessTokenRequest - { - /// - /// 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::Speechify.TtsCreateAccessTokenRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAccessTokenRequest), - jsonSerializerContext) as global::Speechify.TtsCreateAccessTokenRequest; - } - - /// - /// 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::Speechify.TtsCreateAccessTokenRequest? 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::Speechify.TtsCreateAccessTokenRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAccessTokenRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequest.g.cs deleted file mode 100644 index cd40b70..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequest.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateAccessTokenRequest - { - /// - /// in: body - /// - [global::System.Text.Json.Serialization.JsonPropertyName("grant_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsCreateAccessTokenRequestGrantTypeJsonConverter))] - public global::Speechify.TtsCreateAccessTokenRequestGrantType GrantType { get; set; } - - /// - /// The scope, or a space-delimited list of scopes the token is requested for
- /// in: body - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("scope")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsCreateAccessTokenRequestScopeJsonConverter))] - public global::Speechify.TtsCreateAccessTokenRequestScope? Scope { 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. - /// - /// - /// in: body - /// - /// - /// The scope, or a space-delimited list of scopes the token is requested for
- /// in: body - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateAccessTokenRequest( - global::Speechify.TtsCreateAccessTokenRequestGrantType grantType, - global::Speechify.TtsCreateAccessTokenRequestScope? scope) - { - this.GrantType = grantType; - this.Scope = scope; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateAccessTokenRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequestGrantType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequestGrantType.g.cs deleted file mode 100644 index 2963433..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequestGrantType.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// in: body - /// - public enum TtsCreateAccessTokenRequestGrantType - { - /// - /// - /// - ClientCredentials, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsCreateAccessTokenRequestGrantTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsCreateAccessTokenRequestGrantType value) - { - return value switch - { - TtsCreateAccessTokenRequestGrantType.ClientCredentials => "client_credentials", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsCreateAccessTokenRequestGrantType? ToEnum(string value) - { - return value switch - { - "client_credentials" => TtsCreateAccessTokenRequestGrantType.ClientCredentials, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequestScope.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequestScope.g.cs deleted file mode 100644 index f8ae871..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAccessTokenRequestScope.g.cs +++ /dev/null @@ -1,82 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// The scope, or a space-delimited list of scopes the token is requested for
- /// in: body - ///
- public enum TtsCreateAccessTokenRequestScope - { - /// - /// - /// - Audio_all, - /// - /// - /// - Audio_speech, - /// - /// - /// - Audio_stream, - /// - /// - /// - Voices_all, - /// - /// - /// - Voices_create, - /// - /// - /// - Voices_delete, - /// - /// - /// - Voices_read, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsCreateAccessTokenRequestScopeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsCreateAccessTokenRequestScope value) - { - return value switch - { - TtsCreateAccessTokenRequestScope.Audio_all => "audio:all", - TtsCreateAccessTokenRequestScope.Audio_speech => "audio:speech", - TtsCreateAccessTokenRequestScope.Audio_stream => "audio:stream", - TtsCreateAccessTokenRequestScope.Voices_all => "voices:all", - TtsCreateAccessTokenRequestScope.Voices_create => "voices:create", - TtsCreateAccessTokenRequestScope.Voices_delete => "voices:delete", - TtsCreateAccessTokenRequestScope.Voices_read => "voices:read", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsCreateAccessTokenRequestScope? ToEnum(string value) - { - return value switch - { - "audio:all" => TtsCreateAccessTokenRequestScope.Audio_all, - "audio:speech" => TtsCreateAccessTokenRequestScope.Audio_speech, - "audio:stream" => TtsCreateAccessTokenRequestScope.Audio_stream, - "voices:all" => TtsCreateAccessTokenRequestScope.Voices_all, - "voices:create" => TtsCreateAccessTokenRequestScope.Voices_create, - "voices:delete" => TtsCreateAccessTokenRequestScope.Voices_delete, - "voices:read" => TtsCreateAccessTokenRequestScope.Voices_read, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequest.Json.g.cs deleted file mode 100644 index 1eb8896..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentRequest - { - /// - /// 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::Speechify.TtsCreateAgentRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentRequest), - jsonSerializerContext) as global::Speechify.TtsCreateAgentRequest; - } - - /// - /// 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::Speechify.TtsCreateAgentRequest? 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::Speechify.TtsCreateAgentRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequest.g.cs deleted file mode 100644 index 3fa5659..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequest.g.cs +++ /dev/null @@ -1,180 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateAgentRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// Optional. Server derives slug from name with a random suffix when omitted; if you supply your own, a collision returns 400 'slug already taken'. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("slug")] - public string? Slug { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public string? Prompt { get; set; } - - /// - /// Spoken verbatim at session start — no LLM round trip. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_message")] - public string? FirstMessage { get; set; } - - /// - /// Default Value: en - /// - [global::System.Text.Json.Serialization.JsonPropertyName("language")] - public string? Language { get; set; } - - /// - /// Optional chat model slug. Leave empty to use the Speechify default. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("llm_model")] - public string? LlmModel { get; set; } - - /// - /// Voice slug from the VMS catalog (see GET /v1/voices). Required — the server rejects writes with an unknown or empty slug. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string VoiceId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - public object? Config { get; set; } - - /// - /// Default Value: false - /// - [global::System.Text.Json.Serialization.JsonPropertyName("is_public")] - public bool? IsPublic { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("allowed_origins")] - public global::System.Collections.Generic.IList? AllowedOrigins { get; set; } - - /// - /// Optional per-agent hostname allowlist (see Agent schema). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("hostname_allowlist")] - public global::System.Collections.Generic.IList? HostnameAllowlist { get; set; } - - /// - /// Default Value: false - /// - [global::System.Text.Json.Serialization.JsonPropertyName("memory_enabled")] - public bool? MemoryEnabled { get; set; } - - /// - /// Default Value: 90 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("memory_retention_days")] - public int? MemoryRetentionDays { 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. - /// - /// - /// - /// Voice slug from the VMS catalog (see GET /v1/voices). Required — the server rejects writes with an unknown or empty slug. - /// - /// - /// Optional. Server derives slug from name with a random suffix when omitted; if you supply your own, a collision returns 400 'slug already taken'. - /// - /// - /// - /// Spoken verbatim at session start — no LLM round trip. - /// - /// - /// Default Value: en - /// - /// - /// Optional chat model slug. Leave empty to use the Speechify default. - /// - /// - /// - /// - /// Default Value: false - /// - /// - /// - /// Optional per-agent hostname allowlist (see Agent schema). - /// - /// - /// Default Value: false - /// - /// - /// Default Value: 90 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateAgentRequest( - string name, - string voiceId, - string? slug, - string? prompt, - string? firstMessage, - string? language, - string? llmModel, - double? temperature, - object? config, - bool? isPublic, - global::System.Collections.Generic.IList? allowedOrigins, - global::System.Collections.Generic.IList? hostnameAllowlist, - bool? memoryEnabled, - int? memoryRetentionDays) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Slug = slug; - this.Prompt = prompt; - this.FirstMessage = firstMessage; - this.Language = language; - this.LlmModel = llmModel; - this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); - this.Temperature = temperature; - this.Config = config; - this.IsPublic = isPublic; - this.AllowedOrigins = allowedOrigins; - this.HostnameAllowlist = hostnameAllowlist; - this.MemoryEnabled = memoryEnabled; - this.MemoryRetentionDays = memoryRetentionDays; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateAgentRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig.Json.g.cs deleted file mode 100644 index 6f8f691..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentRequestConfig - { - /// - /// 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::Speechify.TtsCreateAgentRequestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentRequestConfig), - jsonSerializerContext) as global::Speechify.TtsCreateAgentRequestConfig; - } - - /// - /// 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::Speechify.TtsCreateAgentRequestConfig? 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::Speechify.TtsCreateAgentRequestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentRequestConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig.g.cs deleted file mode 100644 index 2f2baab..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateAgentRequestConfig - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig2.Json.g.cs deleted file mode 100644 index 9acba3d..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentRequestConfig2 - { - /// - /// 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::Speechify.TtsCreateAgentRequestConfig2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentRequestConfig2), - jsonSerializerContext) as global::Speechify.TtsCreateAgentRequestConfig2; - } - - /// - /// 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::Speechify.TtsCreateAgentRequestConfig2? 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::Speechify.TtsCreateAgentRequestConfig2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentRequestConfig2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig2.g.cs deleted file mode 100644 index ac58260..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentRequestConfig2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsCreateAgentRequestConfig2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestFolderRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestFolderRequest.Json.g.cs deleted file mode 100644 index 5a590ac..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestFolderRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentTestFolderRequest - { - /// - /// 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::Speechify.TtsCreateAgentTestFolderRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentTestFolderRequest), - jsonSerializerContext) as global::Speechify.TtsCreateAgentTestFolderRequest; - } - - /// - /// 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::Speechify.TtsCreateAgentTestFolderRequest? 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::Speechify.TtsCreateAgentTestFolderRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentTestFolderRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentTestFolderRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestFolderRequest.g.cs deleted file mode 100644 index 889b081..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestFolderRequest.g.cs +++ /dev/null @@ -1,53 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateAgentTestFolderRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parent_folder_id")] - public string? ParentFolderId { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateAgentTestFolderRequest( - string name, - string? parentFolderId) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.ParentFolderId = parentFolderId; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateAgentTestFolderRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequest.Json.g.cs deleted file mode 100644 index 6d3b3b7..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentTestRequest - { - /// - /// 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::Speechify.TtsCreateAgentTestRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentTestRequest), - jsonSerializerContext) as global::Speechify.TtsCreateAgentTestRequest; - } - - /// - /// 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::Speechify.TtsCreateAgentTestRequest? 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::Speechify.TtsCreateAgentTestRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentTestRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequest.g.cs deleted file mode 100644 index fa919a0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequest.g.cs +++ /dev/null @@ -1,141 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Payload for `POST /v1/agents/{id}/tests`. - /// - public sealed partial class TtsCreateAgentTestRequest - { - /// - /// Short human-readable label for the test. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// Optional longer description of what this test verifies. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTestTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTestType Type { get; set; } - - /// - /// Type-specific configuration. Must match the shape for the given `type`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsCreateAgentTestRequestConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsCreateAgentTestRequestConfig Config { get; set; } - - /// - /// Optional tool-mocking config applied during every run of this test. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_mock_config")] - public global::Speechify.TtsToolMockConfig? ToolMockConfig { get; set; } - - /// - /// Per-test variable values substituted into string fields of the
- /// config at run-start. Keys use the same rules as agent-level
- /// `DynamicVariable` keys. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("variables")] - public object? Variables { get; set; } - - /// - /// Folder to place the test in. Omit for root. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] - public string? FolderId { get; set; } - - /// - /// Optional list of additional agents this test should also run
- /// against. The owner agent (path param) is always attached
- /// implicitly. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("attached_agent_ids")] - public global::System.Collections.Generic.IList? AttachedAgentIds { 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. - /// - /// - /// Short human-readable label for the test. - /// - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - /// - /// - /// Type-specific configuration. Must match the shape for the given `type`. - /// - /// - /// Optional longer description of what this test verifies. - /// - /// - /// Optional tool-mocking config applied during every run of this test. - /// - /// - /// Per-test variable values substituted into string fields of the
- /// config at run-start. Keys use the same rules as agent-level
- /// `DynamicVariable` keys. - /// - /// - /// Folder to place the test in. Omit for root. - /// - /// - /// Optional list of additional agents this test should also run
- /// against. The owner agent (path param) is always attached
- /// implicitly. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateAgentTestRequest( - string name, - global::Speechify.TtsTestType type, - global::Speechify.TtsCreateAgentTestRequestConfig config, - string? description, - global::Speechify.TtsToolMockConfig? toolMockConfig, - object? variables, - string? folderId, - global::System.Collections.Generic.IList? attachedAgentIds) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description; - this.Type = type; - this.Config = config; - this.ToolMockConfig = toolMockConfig; - this.Variables = variables; - this.FolderId = folderId; - this.AttachedAgentIds = attachedAgentIds; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateAgentTestRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestConfig.Json.g.cs deleted file mode 100644 index 6e1be8e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct TtsCreateAgentTestRequestConfig - { - /// - /// 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::Speechify.TtsCreateAgentTestRequestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentTestRequestConfig), - jsonSerializerContext) as global::Speechify.TtsCreateAgentTestRequestConfig?; - } - - /// - /// 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::Speechify.TtsCreateAgentTestRequestConfig? 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::Speechify.TtsCreateAgentTestRequestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentTestRequestConfig?; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestConfig.g.cs deleted file mode 100644 index 50a7c8f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestConfig.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Speechify -{ - /// - /// Type-specific configuration. Must match the shape for the given `type`. - /// - public readonly partial struct TtsCreateAgentTestRequestConfig : global::System.IEquatable - { - /// - /// Configuration for a `scenario` test. The runner sends `context` as
- /// a user message and asks an LLM judge to evaluate the agent response
- /// against `success_criteria`. Optional few-shot examples sharpen the
- /// judge's calibration. Use `initial_chat_history` to prepend prior
- /// turns before `context`; when the history already ends with a user
- /// message, `context` may be omitted and the agent is evaluated on
- /// its reply to that last history turn. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsScenarioConfig? ScenarioConfig { get; init; } -#else - public global::Speechify.TtsScenarioConfig? ScenarioConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScenarioConfig))] -#endif - public bool IsScenarioConfig => ScenarioConfig != null; - - /// - /// Configuration for a `tool` test. The runner sends `context` as a
- /// user message and asserts that the agent calls `expected_tool` with
- /// arguments matching all `parameter_checks`. Use
- /// `initial_chat_history` to test tool invocations that only make
- /// sense mid-conversation. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsToolCallConfig? ToolCallConfig { get; init; } -#else - public global::Speechify.TtsToolCallConfig? ToolCallConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallConfig))] -#endif - public bool IsToolCallConfig => ToolCallConfig != null; - - /// - /// Configuration for a `simulation` test. An AI caller drives a
- /// multi-turn conversation with the agent according to `scenario`.
- /// After `max_turns` exchanges (or when the agent ends the call), an
- /// LLM judge evaluates whether `success_condition` was met.
- /// Use `initial_chat_history` to seed the conversation at a specific
- /// mid-flow state. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsSimulationConfig? SimulationConfig { get; init; } -#else - public global::Speechify.TtsSimulationConfig? SimulationConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SimulationConfig))] -#endif - public bool IsSimulationConfig => SimulationConfig != null; - /// - /// - /// - public static implicit operator TtsCreateAgentTestRequestConfig(global::Speechify.TtsScenarioConfig value) => new TtsCreateAgentTestRequestConfig((global::Speechify.TtsScenarioConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsScenarioConfig?(TtsCreateAgentTestRequestConfig @this) => @this.ScenarioConfig; - - /// - /// - /// - public TtsCreateAgentTestRequestConfig(global::Speechify.TtsScenarioConfig? value) - { - ScenarioConfig = value; - } - - /// - /// - /// - public static implicit operator TtsCreateAgentTestRequestConfig(global::Speechify.TtsToolCallConfig value) => new TtsCreateAgentTestRequestConfig((global::Speechify.TtsToolCallConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsToolCallConfig?(TtsCreateAgentTestRequestConfig @this) => @this.ToolCallConfig; - - /// - /// - /// - public TtsCreateAgentTestRequestConfig(global::Speechify.TtsToolCallConfig? value) - { - ToolCallConfig = value; - } - - /// - /// - /// - public static implicit operator TtsCreateAgentTestRequestConfig(global::Speechify.TtsSimulationConfig value) => new TtsCreateAgentTestRequestConfig((global::Speechify.TtsSimulationConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsSimulationConfig?(TtsCreateAgentTestRequestConfig @this) => @this.SimulationConfig; - - /// - /// - /// - public TtsCreateAgentTestRequestConfig(global::Speechify.TtsSimulationConfig? value) - { - SimulationConfig = value; - } - - /// - /// - /// - public TtsCreateAgentTestRequestConfig( - global::Speechify.TtsScenarioConfig? scenarioConfig, - global::Speechify.TtsToolCallConfig? toolCallConfig, - global::Speechify.TtsSimulationConfig? simulationConfig - ) - { - ScenarioConfig = scenarioConfig; - ToolCallConfig = toolCallConfig; - SimulationConfig = simulationConfig; - } - - /// - /// - /// - public object? Object => - SimulationConfig as object ?? - ToolCallConfig as object ?? - ScenarioConfig as object - ; - - /// - /// - /// - public override string? ToString() => - ScenarioConfig?.ToString() ?? - ToolCallConfig?.ToString() ?? - SimulationConfig?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsScenarioConfig && !IsToolCallConfig && !IsSimulationConfig || !IsScenarioConfig && IsToolCallConfig && !IsSimulationConfig || !IsScenarioConfig && !IsToolCallConfig && IsSimulationConfig; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? scenarioConfig = null, - global::System.Func? toolCallConfig = null, - global::System.Func? simulationConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsScenarioConfig && scenarioConfig != null) - { - return scenarioConfig(ScenarioConfig!); - } - else if (IsToolCallConfig && toolCallConfig != null) - { - return toolCallConfig(ToolCallConfig!); - } - else if (IsSimulationConfig && simulationConfig != null) - { - return simulationConfig(SimulationConfig!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? scenarioConfig = null, - global::System.Action? toolCallConfig = null, - global::System.Action? simulationConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsScenarioConfig) - { - scenarioConfig?.Invoke(ScenarioConfig!); - } - else if (IsToolCallConfig) - { - toolCallConfig?.Invoke(ToolCallConfig!); - } - else if (IsSimulationConfig) - { - simulationConfig?.Invoke(SimulationConfig!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ScenarioConfig, - typeof(global::Speechify.TtsScenarioConfig), - ToolCallConfig, - typeof(global::Speechify.TtsToolCallConfig), - SimulationConfig, - typeof(global::Speechify.TtsSimulationConfig), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TtsCreateAgentTestRequestConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ScenarioConfig, other.ScenarioConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallConfig, other.ToolCallConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(SimulationConfig, other.SimulationConfig) - ; - } - - /// - /// - /// - public static bool operator ==(TtsCreateAgentTestRequestConfig obj1, TtsCreateAgentTestRequestConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TtsCreateAgentTestRequestConfig obj1, TtsCreateAgentTestRequestConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TtsCreateAgentTestRequestConfig o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables.Json.g.cs deleted file mode 100644 index 5e8f075..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentTestRequestVariables - { - /// - /// 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::Speechify.TtsCreateAgentTestRequestVariables? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentTestRequestVariables), - jsonSerializerContext) as global::Speechify.TtsCreateAgentTestRequestVariables; - } - - /// - /// 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::Speechify.TtsCreateAgentTestRequestVariables? 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::Speechify.TtsCreateAgentTestRequestVariables), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentTestRequestVariables; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables.g.cs deleted file mode 100644 index 10fcbef..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables.g.cs +++ /dev/null @@ -1,20 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Per-test variable values substituted into string fields of the
- /// config at run-start. Keys use the same rules as agent-level
- /// `DynamicVariable` keys. - ///
- public sealed partial class TtsCreateAgentTestRequestVariables - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables2.Json.g.cs deleted file mode 100644 index 8cc54ac..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateAgentTestRequestVariables2 - { - /// - /// 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::Speechify.TtsCreateAgentTestRequestVariables2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateAgentTestRequestVariables2), - jsonSerializerContext) as global::Speechify.TtsCreateAgentTestRequestVariables2; - } - - /// - /// 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::Speechify.TtsCreateAgentTestRequestVariables2? 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::Speechify.TtsCreateAgentTestRequestVariables2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateAgentTestRequestVariables2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables2.g.cs deleted file mode 100644 index 0983083..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateAgentTestRequestVariables2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsCreateAgentTestRequestVariables2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequest.Json.g.cs deleted file mode 100644 index d15200f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateConversationRequest - { - /// - /// 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::Speechify.TtsCreateConversationRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateConversationRequest), - jsonSerializerContext) as global::Speechify.TtsCreateConversationRequest; - } - - /// - /// 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::Speechify.TtsCreateConversationRequest? 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::Speechify.TtsCreateConversationRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateConversationRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateConversationRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequest.g.cs deleted file mode 100644 index da4a432..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequest.g.cs +++ /dev/null @@ -1,62 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Optional body for `POST /v1/agents/{id}/conversations`. - /// - public sealed partial class TtsCreateConversationRequest - { - /// - /// Transport hint. Omit to use the agent's default. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transport")] - public string? Transport { get; set; } - - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one conversation. Keys in the
- /// reserved `system__` namespace are rejected. Values must match the
- /// declared type of the corresponding variable definition on the agent. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("dynamic_variables")] - public object? DynamicVariables { 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. - /// - /// - /// Transport hint. Omit to use the agent's default. - /// - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one conversation. Keys in the
- /// reserved `system__` namespace are rejected. Values must match the
- /// declared type of the corresponding variable definition on the agent. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateConversationRequest( - string? transport, - object? dynamicVariables) - { - this.Transport = transport; - this.DynamicVariables = dynamicVariables; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateConversationRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables.Json.g.cs deleted file mode 100644 index b5019d4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateConversationRequestDynamicVariables - { - /// - /// 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::Speechify.TtsCreateConversationRequestDynamicVariables? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateConversationRequestDynamicVariables), - jsonSerializerContext) as global::Speechify.TtsCreateConversationRequestDynamicVariables; - } - - /// - /// 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::Speechify.TtsCreateConversationRequestDynamicVariables? 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::Speechify.TtsCreateConversationRequestDynamicVariables), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateConversationRequestDynamicVariables; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables.g.cs deleted file mode 100644 index ea12217..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables.g.cs +++ /dev/null @@ -1,21 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one conversation. Keys in the
- /// reserved `system__` namespace are rejected. Values must match the
- /// declared type of the corresponding variable definition on the agent. - ///
- public sealed partial class TtsCreateConversationRequestDynamicVariables - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables2.Json.g.cs deleted file mode 100644 index 15e57c6..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateConversationRequestDynamicVariables2 - { - /// - /// 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::Speechify.TtsCreateConversationRequestDynamicVariables2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateConversationRequestDynamicVariables2), - jsonSerializerContext) as global::Speechify.TtsCreateConversationRequestDynamicVariables2; - } - - /// - /// 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::Speechify.TtsCreateConversationRequestDynamicVariables2? 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::Speechify.TtsCreateConversationRequestDynamicVariables2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateConversationRequestDynamicVariables2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables2.g.cs deleted file mode 100644 index 313f8b0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationRequestDynamicVariables2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsCreateConversationRequestDynamicVariables2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationResponse.Json.g.cs deleted file mode 100644 index 6395952..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateConversationResponse - { - /// - /// 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::Speechify.TtsCreateConversationResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateConversationResponse), - jsonSerializerContext) as global::Speechify.TtsCreateConversationResponse; - } - - /// - /// 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::Speechify.TtsCreateConversationResponse? 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::Speechify.TtsCreateConversationResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateConversationResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateConversationResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationResponse.g.cs deleted file mode 100644 index 70c3586..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateConversationResponse.g.cs +++ /dev/null @@ -1,81 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Returned when a conversation is created. The `token` + `url`
- /// let the caller connect its browser/SDK directly to the
- /// realtime voice session — the agent that answers is dispatched
- /// server-side. - ///
- public sealed partial class TtsCreateConversationResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversation")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsConversation Conversation { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("room")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Room { get; set; } - - /// - /// Short-lived realtime session access token (JWT). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("token")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Token { get; set; } - - /// - /// Realtime session wss:// URL to connect to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// Short-lived realtime session access token (JWT). - /// - /// - /// Realtime session wss:// URL to connect to. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateConversationResponse( - global::Speechify.TtsConversation conversation, - string room, - string token, - string url) - { - this.Conversation = conversation ?? throw new global::System.ArgumentNullException(nameof(conversation)); - this.Room = room ?? throw new global::System.ArgumentNullException(nameof(room)); - this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); - this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateConversationResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateInviteRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateInviteRequest.Json.g.cs deleted file mode 100644 index be0e792..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateInviteRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateInviteRequest - { - /// - /// 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::Speechify.TtsCreateInviteRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateInviteRequest), - jsonSerializerContext) as global::Speechify.TtsCreateInviteRequest; - } - - /// - /// 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::Speechify.TtsCreateInviteRequest? 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::Speechify.TtsCreateInviteRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateInviteRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateInviteRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateInviteRequest.g.cs deleted file mode 100644 index 9feb31b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateInviteRequest.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateInviteRequest - { - /// - /// Email of the person to invite. Validated as an RFC 5322 address. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Email { 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. - /// - /// - /// Email of the person to invite. Validated as an RFC 5322 address. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateInviteRequest( - string email) - { - this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateInviteRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateKnowledgeBaseRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateKnowledgeBaseRequest.Json.g.cs deleted file mode 100644 index d4db855..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateKnowledgeBaseRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateKnowledgeBaseRequest - { - /// - /// 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::Speechify.TtsCreateKnowledgeBaseRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateKnowledgeBaseRequest), - jsonSerializerContext) as global::Speechify.TtsCreateKnowledgeBaseRequest; - } - - /// - /// 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::Speechify.TtsCreateKnowledgeBaseRequest? 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::Speechify.TtsCreateKnowledgeBaseRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateKnowledgeBaseRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateKnowledgeBaseRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateKnowledgeBaseRequest.g.cs deleted file mode 100644 index c916ad7..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateKnowledgeBaseRequest.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateKnowledgeBaseRequest - { - /// - /// Human-readable label. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// Optional description. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { 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. - /// - /// - /// Human-readable label. - /// - /// - /// Optional description. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateKnowledgeBaseRequest( - string name, - string? description) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateKnowledgeBaseRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequest.Json.g.cs deleted file mode 100644 index ca5c23b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateSessionRequest - { - /// - /// 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::Speechify.TtsCreateSessionRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateSessionRequest), - jsonSerializerContext) as global::Speechify.TtsCreateSessionRequest; - } - - /// - /// 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::Speechify.TtsCreateSessionRequest? 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::Speechify.TtsCreateSessionRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateSessionRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateSessionRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequest.g.cs deleted file mode 100644 index 1ace250..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequest.g.cs +++ /dev/null @@ -1,66 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Optional body for `POST /v1/agents/{id}/sessions`. Widget embeds usually pass nothing. - /// - public sealed partial class TtsCreateSessionRequest - { - /// - /// Opaque identifier for the end-user (e.g. your app's user ID). Stamped onto the conversation. Optional - defaults to an anonymous per-session ID. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_identity")] - public string? UserIdentity { get; set; } - - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one session. Keys in the
- /// reserved `system__` namespace are rejected at this boundary.
- /// Values must match the declared type of the corresponding variable
- /// definition on the agent (a `string` type expects a JSON string,
- /// `number` expects a JSON number, etc.). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("dynamic_variables")] - public object? DynamicVariables { 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. - /// - /// - /// Opaque identifier for the end-user (e.g. your app's user ID). Stamped onto the conversation. Optional - defaults to an anonymous per-session ID. - /// - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one session. Keys in the
- /// reserved `system__` namespace are rejected at this boundary.
- /// Values must match the declared type of the corresponding variable
- /// definition on the agent (a `string` type expects a JSON string,
- /// `number` expects a JSON number, etc.). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateSessionRequest( - string? userIdentity, - object? dynamicVariables) - { - this.UserIdentity = userIdentity; - this.DynamicVariables = dynamicVariables; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateSessionRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables.Json.g.cs deleted file mode 100644 index c9071c8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateSessionRequestDynamicVariables - { - /// - /// 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::Speechify.TtsCreateSessionRequestDynamicVariables? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateSessionRequestDynamicVariables), - jsonSerializerContext) as global::Speechify.TtsCreateSessionRequestDynamicVariables; - } - - /// - /// 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::Speechify.TtsCreateSessionRequestDynamicVariables? 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::Speechify.TtsCreateSessionRequestDynamicVariables), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateSessionRequestDynamicVariables; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables.g.cs deleted file mode 100644 index 52a7162..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables.g.cs +++ /dev/null @@ -1,23 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one session. Keys in the
- /// reserved `system__` namespace are rejected at this boundary.
- /// Values must match the declared type of the corresponding variable
- /// definition on the agent (a `string` type expects a JSON string,
- /// `number` expects a JSON number, etc.). - ///
- public sealed partial class TtsCreateSessionRequestDynamicVariables - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables2.Json.g.cs deleted file mode 100644 index c1689cd..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateSessionRequestDynamicVariables2 - { - /// - /// 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::Speechify.TtsCreateSessionRequestDynamicVariables2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateSessionRequestDynamicVariables2), - jsonSerializerContext) as global::Speechify.TtsCreateSessionRequestDynamicVariables2; - } - - /// - /// 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::Speechify.TtsCreateSessionRequestDynamicVariables2? 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::Speechify.TtsCreateSessionRequestDynamicVariables2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateSessionRequestDynamicVariables2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables2.g.cs deleted file mode 100644 index 0cb3ae5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateSessionRequestDynamicVariables2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsCreateSessionRequestDynamicVariables2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequest.Json.g.cs deleted file mode 100644 index 1d24628..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateToolRequest - { - /// - /// 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::Speechify.TtsCreateToolRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateToolRequest), - jsonSerializerContext) as global::Speechify.TtsCreateToolRequest; - } - - /// - /// 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::Speechify.TtsCreateToolRequest? 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::Speechify.TtsCreateToolRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateToolRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateToolRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequest.g.cs deleted file mode 100644 index 881858b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequest.g.cs +++ /dev/null @@ -1,84 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsCreateToolRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("kind")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsToolKindJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsToolKind Kind { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsCreateToolRequestConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsCreateToolRequestConfig Config { 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. - /// - /// - /// - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateToolRequest( - string name, - string description, - global::Speechify.TtsToolKind kind, - global::Speechify.TtsCreateToolRequestConfig config) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Kind = kind; - this.Config = config; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateToolRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequestConfig.Json.g.cs deleted file mode 100644 index 92a5715..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct TtsCreateToolRequestConfig - { - /// - /// 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::Speechify.TtsCreateToolRequestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateToolRequestConfig), - jsonSerializerContext) as global::Speechify.TtsCreateToolRequestConfig?; - } - - /// - /// 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::Speechify.TtsCreateToolRequestConfig? 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::Speechify.TtsCreateToolRequestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateToolRequestConfig?; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequestConfig.g.cs deleted file mode 100644 index 0303773..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateToolRequestConfig.g.cs +++ /dev/null @@ -1,273 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public readonly partial struct TtsCreateToolRequestConfig : global::System.IEquatable - { - /// - /// Config shape for `kind=system`. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsSystemToolConfig? SystemToolConfig { get; init; } -#else - public global::Speechify.TtsSystemToolConfig? SystemToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemToolConfig))] -#endif - public bool IsSystemToolConfig => SystemToolConfig != null; - - /// - /// Config shape for `kind=webhook`. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsWebhookToolConfig? WebhookToolConfig { get; init; } -#else - public global::Speechify.TtsWebhookToolConfig? WebhookToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebhookToolConfig))] -#endif - public bool IsWebhookToolConfig => WebhookToolConfig != null; - - /// - /// Config shape for `kind=client`. Execution happens in the caller's browser / SDK. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsClientToolConfig? ClientToolConfig { get; init; } -#else - public global::Speechify.TtsClientToolConfig? ClientToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientToolConfig))] -#endif - public bool IsClientToolConfig => ClientToolConfig != null; - /// - /// - /// - public static implicit operator TtsCreateToolRequestConfig(global::Speechify.TtsSystemToolConfig value) => new TtsCreateToolRequestConfig((global::Speechify.TtsSystemToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsSystemToolConfig?(TtsCreateToolRequestConfig @this) => @this.SystemToolConfig; - - /// - /// - /// - public TtsCreateToolRequestConfig(global::Speechify.TtsSystemToolConfig? value) - { - SystemToolConfig = value; - } - - /// - /// - /// - public static implicit operator TtsCreateToolRequestConfig(global::Speechify.TtsWebhookToolConfig value) => new TtsCreateToolRequestConfig((global::Speechify.TtsWebhookToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsWebhookToolConfig?(TtsCreateToolRequestConfig @this) => @this.WebhookToolConfig; - - /// - /// - /// - public TtsCreateToolRequestConfig(global::Speechify.TtsWebhookToolConfig? value) - { - WebhookToolConfig = value; - } - - /// - /// - /// - public static implicit operator TtsCreateToolRequestConfig(global::Speechify.TtsClientToolConfig value) => new TtsCreateToolRequestConfig((global::Speechify.TtsClientToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsClientToolConfig?(TtsCreateToolRequestConfig @this) => @this.ClientToolConfig; - - /// - /// - /// - public TtsCreateToolRequestConfig(global::Speechify.TtsClientToolConfig? value) - { - ClientToolConfig = value; - } - - /// - /// - /// - public TtsCreateToolRequestConfig( - global::Speechify.TtsSystemToolConfig? systemToolConfig, - global::Speechify.TtsWebhookToolConfig? webhookToolConfig, - global::Speechify.TtsClientToolConfig? clientToolConfig - ) - { - SystemToolConfig = systemToolConfig; - WebhookToolConfig = webhookToolConfig; - ClientToolConfig = clientToolConfig; - } - - /// - /// - /// - public object? Object => - ClientToolConfig as object ?? - WebhookToolConfig as object ?? - SystemToolConfig as object - ; - - /// - /// - /// - public override string? ToString() => - SystemToolConfig?.ToString() ?? - WebhookToolConfig?.ToString() ?? - ClientToolConfig?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsSystemToolConfig && !IsWebhookToolConfig && !IsClientToolConfig || !IsSystemToolConfig && IsWebhookToolConfig && !IsClientToolConfig || !IsSystemToolConfig && !IsWebhookToolConfig && IsClientToolConfig; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? systemToolConfig = null, - global::System.Func? webhookToolConfig = null, - global::System.Func? clientToolConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsSystemToolConfig && systemToolConfig != null) - { - return systemToolConfig(SystemToolConfig!); - } - else if (IsWebhookToolConfig && webhookToolConfig != null) - { - return webhookToolConfig(WebhookToolConfig!); - } - else if (IsClientToolConfig && clientToolConfig != null) - { - return clientToolConfig(ClientToolConfig!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? systemToolConfig = null, - global::System.Action? webhookToolConfig = null, - global::System.Action? clientToolConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsSystemToolConfig) - { - systemToolConfig?.Invoke(SystemToolConfig!); - } - else if (IsWebhookToolConfig) - { - webhookToolConfig?.Invoke(WebhookToolConfig!); - } - else if (IsClientToolConfig) - { - clientToolConfig?.Invoke(ClientToolConfig!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - SystemToolConfig, - typeof(global::Speechify.TtsSystemToolConfig), - WebhookToolConfig, - typeof(global::Speechify.TtsWebhookToolConfig), - ClientToolConfig, - typeof(global::Speechify.TtsClientToolConfig), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TtsCreateToolRequestConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemToolConfig, other.SystemToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) - ; - } - - /// - /// - /// - public static bool operator ==(TtsCreateToolRequestConfig obj1, TtsCreateToolRequestConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TtsCreateToolRequestConfig obj1, TtsCreateToolRequestConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TtsCreateToolRequestConfig o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceLanguage.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceLanguage.g.cs index fd2ce82..22f2a53 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceLanguage.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceLanguage.g.cs @@ -48,5 +48,6 @@ public TtsCreateVoiceLanguage( public TtsCreateVoiceLanguage() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModel.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModel.g.cs index d636f42..90b8630 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModel.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModel.g.cs @@ -49,5 +49,6 @@ public TtsCreateVoiceModel( public TtsCreateVoiceModel() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModelName.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModelName.g.cs index 4005f6f..17a36d8 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModelName.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateVoiceModelName.g.cs @@ -11,7 +11,7 @@ public enum TtsCreateVoiceModelName /// /// /// - SimbaBase, + Simba30, /// /// /// @@ -20,10 +20,6 @@ public enum TtsCreateVoiceModelName /// ///
SimbaMultilingual, - /// - /// - /// - SimbaTurbo, } /// @@ -38,10 +34,9 @@ public static string ToValueString(this TtsCreateVoiceModelName value) { return value switch { - TtsCreateVoiceModelName.SimbaBase => "simba-base", + TtsCreateVoiceModelName.Simba30 => "simba-3.0", TtsCreateVoiceModelName.SimbaEnglish => "simba-english", TtsCreateVoiceModelName.SimbaMultilingual => "simba-multilingual", - TtsCreateVoiceModelName.SimbaTurbo => "simba-turbo", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -52,10 +47,9 @@ public static string ToValueString(this TtsCreateVoiceModelName value) { return value switch { - "simba-base" => TtsCreateVoiceModelName.SimbaBase, + "simba-3.0" => TtsCreateVoiceModelName.Simba30, "simba-english" => TtsCreateVoiceModelName.SimbaEnglish, "simba-multilingual" => TtsCreateVoiceModelName.SimbaMultilingual, - "simba-turbo" => TtsCreateVoiceModelName.SimbaTurbo, _ => null, }; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateWorkspaceRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateWorkspaceRequest.Json.g.cs deleted file mode 100644 index 51e1ba0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateWorkspaceRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsCreateWorkspaceRequest - { - /// - /// 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::Speechify.TtsCreateWorkspaceRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsCreateWorkspaceRequest), - jsonSerializerContext) as global::Speechify.TtsCreateWorkspaceRequest; - } - - /// - /// 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::Speechify.TtsCreateWorkspaceRequest? 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::Speechify.TtsCreateWorkspaceRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsCreateWorkspaceRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsCreateWorkspaceRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreateWorkspaceRequest.g.cs deleted file mode 100644 index 5fedc81..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreateWorkspaceRequest.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Body for POST /v1/tenants. The `name` field is optional; omitting it falls back to "Workspace". - /// - public sealed partial class TtsCreateWorkspaceRequest - { - /// - /// Display name for the new workspace. Trimmed; must be 120 characters or fewer. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { 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. - /// - /// - /// Display name for the new workspace. Trimmed; must be 120 characters or fewer. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsCreateWorkspaceRequest( - string? name) - { - this.Name = name; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsCreateWorkspaceRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsCreatedVoice.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsCreatedVoice.g.cs index 9ae53ff..0dc2e58 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsCreatedVoice.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsCreatedVoice.g.cs @@ -101,5 +101,6 @@ public TtsCreatedVoice( public TtsCreatedVoice() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionField.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionField.Json.g.cs deleted file mode 100644 index 657244c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionField.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsDataCollectionField - { - /// - /// 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::Speechify.TtsDataCollectionField? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsDataCollectionField), - jsonSerializerContext) as global::Speechify.TtsDataCollectionField; - } - - /// - /// 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::Speechify.TtsDataCollectionField? 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::Speechify.TtsDataCollectionField), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsDataCollectionField; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsDataCollectionField.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionField.g.cs deleted file mode 100644 index c04bf01..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionField.g.cs +++ /dev/null @@ -1,67 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A structured value the post-call evaluator should extract from the
- /// transcript. `int` is distinct from `number` so downstream consumers
- /// receive whole integers without a synthetic decimal. - ///
- public sealed partial class TtsDataCollectionField - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("key")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Key { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsDataCollectionFieldTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsDataCollectionFieldType Type { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsDataCollectionField( - string key, - string description, - global::Speechify.TtsDataCollectionFieldType type) - { - this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Type = type; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsDataCollectionField() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionFieldType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionFieldType.g.cs deleted file mode 100644 index baa6faf..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDataCollectionFieldType.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsDataCollectionFieldType - { - /// - /// - /// - Boolean, - /// - /// - /// - Int, - /// - /// - /// - Number, - /// - /// - /// - String, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsDataCollectionFieldTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsDataCollectionFieldType value) - { - return value switch - { - TtsDataCollectionFieldType.Boolean => "boolean", - TtsDataCollectionFieldType.Int => "int", - TtsDataCollectionFieldType.Number => "number", - TtsDataCollectionFieldType.String => "string", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsDataCollectionFieldType? ToEnum(string value) - { - return value switch - { - "boolean" => TtsDataCollectionFieldType.Boolean, - "int" => TtsDataCollectionFieldType.Int, - "number" => TtsDataCollectionFieldType.Number, - "string" => TtsDataCollectionFieldType.String, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerRequest.Json.g.cs deleted file mode 100644 index b5d4249..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsDeleteMemoriesByCallerRequest - { - /// - /// 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::Speechify.TtsDeleteMemoriesByCallerRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsDeleteMemoriesByCallerRequest), - jsonSerializerContext) as global::Speechify.TtsDeleteMemoriesByCallerRequest; - } - - /// - /// 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::Speechify.TtsDeleteMemoriesByCallerRequest? 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::Speechify.TtsDeleteMemoriesByCallerRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsDeleteMemoriesByCallerRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerRequest.g.cs deleted file mode 100644 index 85172d2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerRequest.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsDeleteMemoriesByCallerRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("caller_identity")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallerIdentity { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsDeleteMemoriesByCallerRequest( - string agentId, - string callerIdentity) - { - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.CallerIdentity = callerIdentity ?? throw new global::System.ArgumentNullException(nameof(callerIdentity)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsDeleteMemoriesByCallerRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerResponse.Json.g.cs deleted file mode 100644 index d0c1b2a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsDeleteMemoriesByCallerResponse - { - /// - /// 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::Speechify.TtsDeleteMemoriesByCallerResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsDeleteMemoriesByCallerResponse), - jsonSerializerContext) as global::Speechify.TtsDeleteMemoriesByCallerResponse; - } - - /// - /// 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::Speechify.TtsDeleteMemoriesByCallerResponse? 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::Speechify.TtsDeleteMemoriesByCallerResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsDeleteMemoriesByCallerResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerResponse.g.cs deleted file mode 100644 index a32475c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDeleteMemoriesByCallerResponse.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsDeleteMemoriesByCallerResponse - { - /// - /// Number of memories soft-deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("deleted")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Deleted { 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. - /// - /// - /// Number of memories soft-deleted. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsDeleteMemoriesByCallerResponse( - int deleted) - { - this.Deleted = deleted; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsDeleteMemoriesByCallerResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariable.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariable.Json.g.cs deleted file mode 100644 index 44cb6b2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariable.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsDynamicVariable - { - /// - /// 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::Speechify.TtsDynamicVariable? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsDynamicVariable), - jsonSerializerContext) as global::Speechify.TtsDynamicVariable; - } - - /// - /// 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::Speechify.TtsDynamicVariable? 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::Speechify.TtsDynamicVariable), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsDynamicVariable; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsDynamicVariable.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariable.g.cs deleted file mode 100644 index 3008659..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariable.g.cs +++ /dev/null @@ -1,100 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One customer-scope variable definition on an agent. Referenced in
- /// prompts, first messages, and webhook tool configs via `{{key}}` or
- /// `{{key|json}}`. Missing variables render as empty string at dispatch
- /// time - a typo never breaks a session. - ///
- public sealed partial class TtsDynamicVariable - { - /// - /// Variable name. Must match `[a-zA-Z0-9_]+`. The `system__` prefix
- /// is reserved for platform-populated variables and will be rejected. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("key")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Key { get; set; } - - /// - /// Declared type of a customer-scope variable. Enforced at save time
- /// and again at session-start when an override value is supplied.
- /// - `string` - plain text value; interpolated verbatim with `{{name}}`
- /// - `number` - numeric value; rendered as its decimal representation
- /// - `boolean` - `true` or `false`
- /// - `json` - any valid JSON value; use `{{name|json}}` to inject
- /// safely inside JSON tool bodies - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsDynamicVariableTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsDynamicVariableType Type { get; set; } - - /// - /// Optional default value used when no per-session override is
- /// supplied. Must conform to the declared `type`. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("default")] - public object? Default { get; set; } - - /// - /// Human-readable note shown in the console variable editor. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { 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. - /// - /// - /// Variable name. Must match `[a-zA-Z0-9_]+`. The `system__` prefix
- /// is reserved for platform-populated variables and will be rejected. - /// - /// - /// Declared type of a customer-scope variable. Enforced at save time
- /// and again at session-start when an override value is supplied.
- /// - `string` - plain text value; interpolated verbatim with `{{name}}`
- /// - `number` - numeric value; rendered as its decimal representation
- /// - `boolean` - `true` or `false`
- /// - `json` - any valid JSON value; use `{{name|json}}` to inject
- /// safely inside JSON tool bodies - /// - /// - /// Optional default value used when no per-session override is
- /// supplied. Must conform to the declared `type`. - /// - /// - /// Human-readable note shown in the console variable editor. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsDynamicVariable( - string key, - global::Speechify.TtsDynamicVariableType type, - object? @default, - string? description) - { - this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); - this.Type = type; - this.Default = @default; - this.Description = description; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsDynamicVariable() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableDefault.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableDefault.Json.g.cs deleted file mode 100644 index 2916c59..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableDefault.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsDynamicVariableDefault - { - /// - /// 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::Speechify.TtsDynamicVariableDefault? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsDynamicVariableDefault), - jsonSerializerContext) as global::Speechify.TtsDynamicVariableDefault; - } - - /// - /// 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::Speechify.TtsDynamicVariableDefault? 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::Speechify.TtsDynamicVariableDefault), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsDynamicVariableDefault; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsDynamicVariableDefault.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableDefault.g.cs deleted file mode 100644 index 6d6e942..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableDefault.g.cs +++ /dev/null @@ -1,19 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Optional default value used when no per-session override is
- /// supplied. Must conform to the declared `type`. - ///
- public sealed partial class TtsDynamicVariableDefault - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableType.g.cs deleted file mode 100644 index 8f89924..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsDynamicVariableType.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Declared type of a customer-scope variable. Enforced at save time
- /// and again at session-start when an override value is supplied.
- /// - `string` - plain text value; interpolated verbatim with `{{name}}`
- /// - `number` - numeric value; rendered as its decimal representation
- /// - `boolean` - `true` or `false`
- /// - `json` - any valid JSON value; use `{{name|json}}` to inject
- /// safely inside JSON tool bodies - ///
- public enum TtsDynamicVariableType - { - /// - /// - /// - Boolean, - /// - /// - /// - Json, - /// - /// - /// - Number, - /// - /// - /// - String, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsDynamicVariableTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsDynamicVariableType value) - { - return value switch - { - TtsDynamicVariableType.Boolean => "boolean", - TtsDynamicVariableType.Json => "json", - TtsDynamicVariableType.Number => "number", - TtsDynamicVariableType.String => "string", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsDynamicVariableType? ToEnum(string value) - { - return value switch - { - "boolean" => TtsDynamicVariableType.Boolean, - "json" => TtsDynamicVariableType.Json, - "number" => TtsDynamicVariableType.Number, - "string" => TtsDynamicVariableType.String, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluation.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsError.Json.g.cs similarity index 89% rename from src/libs/Speechify/Generated/Speechify.Models.TtsEvaluation.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.TtsError.Json.g.cs index 5784fdf..b731662 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluation.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsError.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class TtsEvaluation + public sealed partial class TtsError { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.TtsEvaluation? FromJson( + public static global::Speechify.TtsError? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.TtsEvaluation), - jsonSerializerContext) as global::Speechify.TtsEvaluation; + typeof(global::Speechify.TtsError), + jsonSerializerContext) as global::Speechify.TtsError; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Speechify.TtsEvaluation? FromJson( + public static global::Speechify.TtsError? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Speechify.TtsEvaluation), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsEvaluation; + typeof(global::Speechify.TtsError), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsError; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsError.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsError.g.cs new file mode 100644 index 0000000..329d160 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsError.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Standard error envelope returned on every non-2xx response.
+ /// Content-Type is `application/json`. The shape mirrors OpenAI /
+ /// Anthropic / Stripe style: a machine-readable `error.code` for
+ /// SDK consumers to switch on, a human `error.message` for UI,
+ /// and an optional `error.fields` map for per-field validation
+ /// errors. `request_id` matches the `X-Request-ID` response
+ /// header and is what customers quote when filing support
+ /// tickets. + ///
+ public sealed partial class TtsError + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.TtsErrorDetail Error { get; set; } + + /// + /// Server-side request identifier. Echoes the
+ /// `X-Request-ID` response header. Stable across the
+ /// request's lifetime, written to structured logs, and
+ /// useful when reporting issues. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] + public string? RequestId { 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. + /// + /// + /// + /// Server-side request identifier. Echoes the
+ /// `X-Request-ID` response header. Stable across the
+ /// request's lifetime, written to structured logs, and
+ /// useful when reporting issues. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TtsError( + global::Speechify.TtsErrorDetail error, + string? requestId) + { + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); + this.RequestId = requestId; + } + + /// + /// Initializes a new instance of the class. + /// + public TtsError() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsErrorCode.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorCode.g.cs new file mode 100644 index 0000000..5915935 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorCode.g.cs @@ -0,0 +1,146 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Stable machine-readable error code. Additive only: codes are
+ /// never renamed, only deprecated. SDKs may map each code to a
+ /// typed exception class. Status-code semantics:
+ /// 4xx codes describe caller-fixable issues; 5xx codes describe
+ /// server-side failures and are safe to retry with backoff for
+ /// idempotent requests. + ///
+ public enum TtsErrorCode + { + /// + /// + /// + BadRequest, + /// + /// + /// + CallerNotFound, + /// + /// + /// + Conflict, + /// + /// + /// + CredentialNotFound, + /// + /// + /// + Forbidden, + /// + /// + /// + InternalError, + /// + /// + /// + MethodNotAllowed, + /// + /// + /// + NotFound, + /// + /// + /// + PayloadTooLarge, + /// + /// + /// + PaymentMethodRequired, + /// + /// + /// + PaymentRequired, + /// + /// + /// + RateLimited, + /// + /// + /// + ServiceUnavailable, + /// + /// + /// + Unauthorized, + /// + /// + /// + UnsupportedMediaType, + /// + /// + /// + UpstreamFailure, + /// + /// + /// + ValidationFailed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsErrorCodeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsErrorCode value) + { + return value switch + { + TtsErrorCode.BadRequest => "bad_request", + TtsErrorCode.CallerNotFound => "caller_not_found", + TtsErrorCode.Conflict => "conflict", + TtsErrorCode.CredentialNotFound => "credential_not_found", + TtsErrorCode.Forbidden => "forbidden", + TtsErrorCode.InternalError => "internal_error", + TtsErrorCode.MethodNotAllowed => "method_not_allowed", + TtsErrorCode.NotFound => "not_found", + TtsErrorCode.PayloadTooLarge => "payload_too_large", + TtsErrorCode.PaymentMethodRequired => "payment_method_required", + TtsErrorCode.PaymentRequired => "payment_required", + TtsErrorCode.RateLimited => "rate_limited", + TtsErrorCode.ServiceUnavailable => "service_unavailable", + TtsErrorCode.Unauthorized => "unauthorized", + TtsErrorCode.UnsupportedMediaType => "unsupported_media_type", + TtsErrorCode.UpstreamFailure => "upstream_failure", + TtsErrorCode.ValidationFailed => "validation_failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsErrorCode? ToEnum(string value) + { + return value switch + { + "bad_request" => TtsErrorCode.BadRequest, + "caller_not_found" => TtsErrorCode.CallerNotFound, + "conflict" => TtsErrorCode.Conflict, + "credential_not_found" => TtsErrorCode.CredentialNotFound, + "forbidden" => TtsErrorCode.Forbidden, + "internal_error" => TtsErrorCode.InternalError, + "method_not_allowed" => TtsErrorCode.MethodNotAllowed, + "not_found" => TtsErrorCode.NotFound, + "payload_too_large" => TtsErrorCode.PayloadTooLarge, + "payment_method_required" => TtsErrorCode.PaymentMethodRequired, + "payment_required" => TtsErrorCode.PaymentRequired, + "rate_limited" => TtsErrorCode.RateLimited, + "service_unavailable" => TtsErrorCode.ServiceUnavailable, + "unauthorized" => TtsErrorCode.Unauthorized, + "unsupported_media_type" => TtsErrorCode.UnsupportedMediaType, + "upstream_failure" => TtsErrorCode.UpstreamFailure, + "validation_failed" => TtsErrorCode.ValidationFailed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationData.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetail.Json.g.cs similarity index 88% rename from src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationData.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetail.Json.g.cs index 87a604e..66faa09 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationData.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetail.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class TtsEvaluationData + public sealed partial class TtsErrorDetail { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.TtsEvaluationData? FromJson( + public static global::Speechify.TtsErrorDetail? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.TtsEvaluationData), - jsonSerializerContext) as global::Speechify.TtsEvaluationData; + typeof(global::Speechify.TtsErrorDetail), + jsonSerializerContext) as global::Speechify.TtsErrorDetail; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Speechify.TtsEvaluationData? FromJson( + public static global::Speechify.TtsErrorDetail? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Speechify.TtsEvaluationData), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsEvaluationData; + typeof(global::Speechify.TtsErrorDetail), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsErrorDetail; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetail.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetail.g.cs new file mode 100644 index 0000000..7c0c59f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetail.g.cs @@ -0,0 +1,97 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class TtsErrorDetail + { + /// + /// Stable machine-readable error code. Additive only: codes are
+ /// never renamed, only deprecated. SDKs may map each code to a
+ /// typed exception class. Status-code semantics:
+ /// 4xx codes describe caller-fixable issues; 5xx codes describe
+ /// server-side failures and are safe to retry with backoff for
+ /// idempotent requests. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsErrorCodeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.TtsErrorCode Code { get; set; } + + /// + /// Human-readable explanation of this specific occurrence.
+ /// Safe to surface in UI banners or pass to support. The
+ /// wording can change between releases; clients should
+ /// match on `code`, not on the message string. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Per-field validation errors as `path -> message`. Only
+ /// present on 400 responses caused by request validation
+ /// (typically code=`validation_failed`). Keys are field
+ /// paths in dotted/bracket notation; values are short
+ /// human explanations safe to inline-surface next to the
+ /// offending form field. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("fields")] + public global::System.Collections.Generic.Dictionary? Fields { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Stable machine-readable error code. Additive only: codes are
+ /// never renamed, only deprecated. SDKs may map each code to a
+ /// typed exception class. Status-code semantics:
+ /// 4xx codes describe caller-fixable issues; 5xx codes describe
+ /// server-side failures and are safe to retry with backoff for
+ /// idempotent requests. + /// + /// + /// Human-readable explanation of this specific occurrence.
+ /// Safe to surface in UI banners or pass to support. The
+ /// wording can change between releases; clients should
+ /// match on `code`, not on the message string. + /// + /// + /// Per-field validation errors as `path -> message`. Only
+ /// present on 400 responses caused by request validation
+ /// (typically code=`validation_failed`). Keys are field
+ /// paths in dotted/bracket notation; values are short
+ /// human explanations safe to inline-surface next to the
+ /// offending form field. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TtsErrorDetail( + global::Speechify.TtsErrorCode code, + string message, + global::System.Collections.Generic.Dictionary? fields) + { + this.Code = code; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.Fields = fields; + } + + /// + /// Initializes a new instance of the class. + /// + public TtsErrorDetail() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetailFields.Json.g.cs similarity index 88% rename from src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationConfig.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetailFields.Json.g.cs index 136b38d..91ee36c 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationConfig.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetailFields.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class TtsEvaluationConfig + public sealed partial class TtsErrorDetailFields { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.TtsEvaluationConfig? FromJson( + public static global::Speechify.TtsErrorDetailFields? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.TtsEvaluationConfig), - jsonSerializerContext) as global::Speechify.TtsEvaluationConfig; + typeof(global::Speechify.TtsErrorDetailFields), + jsonSerializerContext) as global::Speechify.TtsErrorDetailFields; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Speechify.TtsEvaluationConfig? FromJson( + public static global::Speechify.TtsErrorDetailFields? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Speechify.TtsEvaluationConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsEvaluationConfig; + typeof(global::Speechify.TtsErrorDetailFields), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsErrorDetailFields; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetailFields.g.cs similarity index 52% rename from src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetailFields.g.cs index 483543c..87e3917 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsAgentTestWithLastRunVariables.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsErrorDetailFields.g.cs @@ -4,11 +4,14 @@ namespace Speechify { /// - /// Per-test dynamic-variable overrides. Keys substitute `{{key}}`
- /// placeholders inside the test config at run-start. Unknown keys
- /// render as empty string, matching session dispatch behaviour. + /// Per-field validation errors as `path -> message`. Only
+ /// present on 400 responses caused by request validation
+ /// (typically code=`validation_failed`). Keys are field
+ /// paths in dotted/bracket notation; values are short
+ /// human explanations safe to inline-surface next to the
+ /// offending form field. ///
- public sealed partial class TtsAgentTestWithLastRunVariables + public sealed partial class TtsErrorDetailFields { /// @@ -16,5 +19,6 @@ public sealed partial class TtsAgentTestWithLastRunVariables /// [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluation.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluation.g.cs deleted file mode 100644 index 9afffd5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluation.g.cs +++ /dev/null @@ -1,151 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Three flavours coexist, discriminated by `kind`:
- /// - `criterion` rows carry `status` + `passed` + `score` + `rationale` for one criterion
- /// - `summary` row carries overall sentiment + rationale in `rationale`
- /// - `data` row carries the structured data-collection payload in `data`
- /// `status` is the canonical three-state result. `passed` is a
- /// derived boolean kept for backwards compatibility with earlier
- /// webhook consumers: success→true, failure→false, unknown→null. - ///
- public sealed partial class TtsEvaluation - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ConversationId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("kind")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsEvaluationKindJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsEvaluationKind Kind { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("criterion_id")] - public string? CriterionId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// Three-state criterion result. `unknown` means the criterion did not apply to this call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OneOfJsonConverter))] - public global::Speechify.OneOf? Status { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - public bool? Passed { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - public double? Score { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rationale")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Rationale { get; set; } - - /// - /// Structured data-collection payload (present only on `kind=data` rows). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] - public object? Data { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { 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. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Three-state criterion result. `unknown` means the criterion did not apply to this call. - /// - /// - /// - /// - /// Structured data-collection payload (present only on `kind=data` rows). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsEvaluation( - string id, - string conversationId, - global::Speechify.TtsEvaluationKind kind, - string name, - string rationale, - global::System.DateTime createdAt, - string? criterionId, - global::Speechify.OneOf? status, - bool? passed, - double? score, - object? data) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.ConversationId = conversationId ?? throw new global::System.ArgumentNullException(nameof(conversationId)); - this.Kind = kind; - this.CriterionId = criterionId; - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Status = status; - this.Passed = passed; - this.Score = score; - this.Rationale = rationale ?? throw new global::System.ArgumentNullException(nameof(rationale)); - this.Data = data; - this.CreatedAt = createdAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsEvaluation() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationConfig.g.cs deleted file mode 100644 index a5f14d6..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationConfig.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsEvaluationConfig - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("criteria")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Criteria { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data_collection")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList DataCollection { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsEvaluationConfig( - global::System.Collections.Generic.IList criteria, - global::System.Collections.Generic.IList dataCollection) - { - this.Criteria = criteria ?? throw new global::System.ArgumentNullException(nameof(criteria)); - this.DataCollection = dataCollection ?? throw new global::System.ArgumentNullException(nameof(dataCollection)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsEvaluationConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationCriterion.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationCriterion.Json.g.cs deleted file mode 100644 index d159b04..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationCriterion.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsEvaluationCriterion - { - /// - /// 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::Speechify.TtsEvaluationCriterion? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsEvaluationCriterion), - jsonSerializerContext) as global::Speechify.TtsEvaluationCriterion; - } - - /// - /// 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::Speechify.TtsEvaluationCriterion? 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::Speechify.TtsEvaluationCriterion), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsEvaluationCriterion; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsEvaluationCriterion.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationCriterion.g.cs deleted file mode 100644 index 6bfbbb1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationCriterion.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One LLM-scored assertion about the call ("Did the agent confirm the customer's name?"). - /// - public sealed partial class TtsEvaluationCriterion - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsEvaluationCriterion( - string id, - string name, - string description) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsEvaluationCriterion() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationData.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationData.g.cs deleted file mode 100644 index ed92a57..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationData.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsEvaluationData - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationKind.g.cs deleted file mode 100644 index fd1dfc4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationKind.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsEvaluationKind - { - /// - /// - /// - Criterion, - /// - /// - /// - Data, - /// - /// - /// - Summary, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsEvaluationKindExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsEvaluationKind value) - { - return value switch - { - TtsEvaluationKind.Criterion => "criterion", - TtsEvaluationKind.Data => "data", - TtsEvaluationKind.Summary => "summary", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsEvaluationKind? ToEnum(string value) - { - return value switch - { - "criterion" => TtsEvaluationKind.Criterion, - "data" => TtsEvaluationKind.Data, - "summary" => TtsEvaluationKind.Summary, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationStatus.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationStatus.g.cs deleted file mode 100644 index 4a2a059..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsEvaluationStatus.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Three-state criterion result. `unknown` means the criterion did not apply to this call. - /// - public enum TtsEvaluationStatus - { - /// - /// - /// - Failure, - /// - /// - /// - Success, - /// - /// - /// - Unknown, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsEvaluationStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsEvaluationStatus value) - { - return value switch - { - TtsEvaluationStatus.Failure => "failure", - TtsEvaluationStatus.Success => "success", - TtsEvaluationStatus.Unknown => "unknown", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsEvaluationStatus? ToEnum(string value) - { - return value switch - { - "failure" => TtsEvaluationStatus.Failure, - "success" => TtsEvaluationStatus.Success, - "unknown" => TtsEvaluationStatus.Unknown, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechOptionsRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechOptionsRequest.g.cs index 275878e..fbc9156 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechOptionsRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechOptionsRequest.g.cs @@ -70,5 +70,6 @@ public TtsGetSpeechOptionsRequest( public TtsGetSpeechOptionsRequest() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequest.g.cs index 86e3c22..90d340f 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequest.g.cs @@ -4,7 +4,7 @@ namespace Speechify { /// - /// GetSpeechRequest is the wrapper for request parameters to the client + /// Request body for POST /v1/audio/speech. /// public sealed partial class TtsGetSpeechRequest { @@ -33,7 +33,7 @@ public sealed partial class TtsGetSpeechRequest public string? Language { get; set; } /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] @@ -79,7 +79,7 @@ public sealed partial class TtsGetSpeechRequest /// Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. /// /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english /// /// @@ -110,5 +110,6 @@ public TtsGetSpeechRequest( public TtsGetSpeechRequest() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequestModel.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequestModel.g.cs index ff71334..c6edef5 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequestModel.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechRequestModel.g.cs @@ -4,7 +4,7 @@ namespace Speechify { /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english ///
public enum TtsGetSpeechRequestModel @@ -12,7 +12,7 @@ public enum TtsGetSpeechRequestModel /// /// /// - SimbaBase, + Simba30, /// /// /// @@ -21,10 +21,6 @@ public enum TtsGetSpeechRequestModel /// ///
SimbaMultilingual, - /// - /// - /// - SimbaTurbo, } /// @@ -39,10 +35,9 @@ public static string ToValueString(this TtsGetSpeechRequestModel value) { return value switch { - TtsGetSpeechRequestModel.SimbaBase => "simba-base", + TtsGetSpeechRequestModel.Simba30 => "simba-3.0", TtsGetSpeechRequestModel.SimbaEnglish => "simba-english", TtsGetSpeechRequestModel.SimbaMultilingual => "simba-multilingual", - TtsGetSpeechRequestModel.SimbaTurbo => "simba-turbo", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -53,10 +48,9 @@ public static string ToValueString(this TtsGetSpeechRequestModel value) { return value switch { - "simba-base" => TtsGetSpeechRequestModel.SimbaBase, + "simba-3.0" => TtsGetSpeechRequestModel.Simba30, "simba-english" => TtsGetSpeechRequestModel.SimbaEnglish, "simba-multilingual" => TtsGetSpeechRequestModel.SimbaMultilingual, - "simba-turbo" => TtsGetSpeechRequestModel.SimbaTurbo, _ => null, }; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechResponse.g.cs index 928ba91..026f87b 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechResponse.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetSpeechResponse.g.cs @@ -79,5 +79,6 @@ public TtsGetSpeechResponse( public TtsGetSpeechResponse() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamOptionsRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamOptionsRequest.g.cs index acfa5b8..fb45d31 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamOptionsRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamOptionsRequest.g.cs @@ -70,5 +70,6 @@ public TtsGetStreamOptionsRequest( public TtsGetStreamOptionsRequest() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequest.g.cs index 9c4691a..3642983 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequest.g.cs @@ -25,7 +25,7 @@ public sealed partial class TtsGetStreamRequest public string? Language { get; set; } /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] @@ -67,7 +67,7 @@ public sealed partial class TtsGetStreamRequest /// Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. /// /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english /// /// @@ -96,5 +96,6 @@ public TtsGetStreamRequest( public TtsGetStreamRequest() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequestModel.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequestModel.g.cs index 6600537..7b44974 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequestModel.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetStreamRequestModel.g.cs @@ -4,7 +4,7 @@ namespace Speechify { /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english ///
public enum TtsGetStreamRequestModel @@ -12,7 +12,7 @@ public enum TtsGetStreamRequestModel /// /// /// - SimbaBase, + Simba30, /// /// /// @@ -21,10 +21,6 @@ public enum TtsGetStreamRequestModel /// ///
SimbaMultilingual, - /// - /// - /// - SimbaTurbo, } /// @@ -39,10 +35,9 @@ public static string ToValueString(this TtsGetStreamRequestModel value) { return value switch { - TtsGetStreamRequestModel.SimbaBase => "simba-base", + TtsGetStreamRequestModel.Simba30 => "simba-3.0", TtsGetStreamRequestModel.SimbaEnglish => "simba-english", TtsGetStreamRequestModel.SimbaMultilingual => "simba-multilingual", - TtsGetStreamRequestModel.SimbaTurbo => "simba-turbo", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -53,10 +48,9 @@ public static string ToValueString(this TtsGetStreamRequestModel value) { return value switch { - "simba-base" => TtsGetStreamRequestModel.SimbaBase, + "simba-3.0" => TtsGetStreamRequestModel.Simba30, "simba-english" => TtsGetStreamRequestModel.SimbaEnglish, "simba-multilingual" => TtsGetStreamRequestModel.SimbaMultilingual, - "simba-turbo" => TtsGetStreamRequestModel.SimbaTurbo, _ => null, }; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoice.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoice.g.cs index e148758..9bb6ae4 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoice.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoice.g.cs @@ -119,5 +119,6 @@ public TtsGetVoice( public TtsGetVoice() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoiceLanguage.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoiceLanguage.g.cs index 026d79e..5be69fe 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoiceLanguage.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoiceLanguage.g.cs @@ -49,5 +49,6 @@ public TtsGetVoiceLanguage( public TtsGetVoiceLanguage() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModel.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModel.g.cs index a6d3f09..0e51571 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModel.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModel.g.cs @@ -51,5 +51,6 @@ public TtsGetVoicesModel( public TtsGetVoicesModel() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModelName.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModelName.g.cs index 63e89cf..3e6202b 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModelName.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsGetVoicesModelName.g.cs @@ -11,7 +11,7 @@ public enum TtsGetVoicesModelName /// /// /// - SimbaBase, + Simba30, /// /// /// @@ -20,10 +20,6 @@ public enum TtsGetVoicesModelName /// /// SimbaMultilingual, - /// - /// - /// - SimbaTurbo, } /// @@ -38,10 +34,9 @@ public static string ToValueString(this TtsGetVoicesModelName value) { return value switch { - TtsGetVoicesModelName.SimbaBase => "simba-base", + TtsGetVoicesModelName.Simba30 => "simba-3.0", TtsGetVoicesModelName.SimbaEnglish => "simba-english", TtsGetVoicesModelName.SimbaMultilingual => "simba-multilingual", - TtsGetVoicesModelName.SimbaTurbo => "simba-turbo", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -52,10 +47,9 @@ public static string ToValueString(this TtsGetVoicesModelName value) { return value switch { - "simba-base" => TtsGetVoicesModelName.SimbaBase, + "simba-3.0" => TtsGetVoicesModelName.Simba30, "simba-english" => TtsGetVoicesModelName.SimbaEnglish, "simba-multilingual" => TtsGetVoicesModelName.SimbaMultilingual, - "simba-turbo" => TtsGetVoicesModelName.SimbaTurbo, _ => null, }; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsInvite.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsInvite.Json.g.cs deleted file mode 100644 index a5b9495..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsInvite.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsInvite - { - /// - /// 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::Speechify.TtsInvite? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsInvite), - jsonSerializerContext) as global::Speechify.TtsInvite; - } - - /// - /// 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::Speechify.TtsInvite? 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::Speechify.TtsInvite), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsInvite; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsInvite.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsInvite.g.cs deleted file mode 100644 index 8916ef8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsInvite.g.cs +++ /dev/null @@ -1,127 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A pending or historical workspace invite. - /// - public sealed partial class TtsInvite - { - /// - /// Opaque invite ID. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Invitee email. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Email { get; set; } - - /// - /// Firebase UID of the member who created the invite. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("invited_by")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string InvitedBy { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime ExpiresAt { get; set; } - - /// - /// Populated once the invite has been accepted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("accepted_at")] - public global::System.DateTime? AcceptedAt { get; set; } - - /// - /// Populated once the invite has been revoked. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("revoked_at")] - public global::System.DateTime? RevokedAt { get; set; } - - /// - /// Invite token. Returned ONLY on the create-invite response;
- /// subsequent list calls redact it. Use the token to build the
- /// `/join/{token}` join URL. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("token")] - public string? Token { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Opaque invite ID. - /// - /// - /// Invitee email. - /// - /// - /// Firebase UID of the member who created the invite. - /// - /// - /// - /// - /// Populated once the invite has been accepted. - /// - /// - /// Populated once the invite has been revoked. - /// - /// - /// Invite token. Returned ONLY on the create-invite response;
- /// subsequent list calls redact it. Use the token to build the
- /// `/join/{token}` join URL. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsInvite( - string id, - string email, - string invitedBy, - global::System.DateTime createdAt, - global::System.DateTime expiresAt, - global::System.DateTime? acceptedAt, - global::System.DateTime? revokedAt, - string? token) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Email = email ?? throw new global::System.ArgumentNullException(nameof(email)); - this.InvitedBy = invitedBy ?? throw new global::System.ArgumentNullException(nameof(invitedBy)); - this.CreatedAt = createdAt; - this.ExpiresAt = expiresAt; - this.AcceptedAt = acceptedAt; - this.RevokedAt = revokedAt; - this.Token = token; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsInvite() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsInvitePreview.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsInvitePreview.Json.g.cs deleted file mode 100644 index afea293..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsInvitePreview.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsInvitePreview - { - /// - /// 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::Speechify.TtsInvitePreview? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsInvitePreview), - jsonSerializerContext) as global::Speechify.TtsInvitePreview; - } - - /// - /// 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::Speechify.TtsInvitePreview? 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::Speechify.TtsInvitePreview), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsInvitePreview; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsInvitePreview.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsInvitePreview.g.cs deleted file mode 100644 index 5a53a59..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsInvitePreview.g.cs +++ /dev/null @@ -1,109 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Unauthenticated preview of a workspace invite. Surfaces only what
- /// the recipient needs to decide whether to accept (workspace name,
- /// invited address, inviter, expiry). Billing, plan, data region,
- /// and invite token are deliberately omitted. - ///
- public sealed partial class TtsInvitePreview - { - /// - /// Opaque workspace id. Safe to echo back on the accept call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tenant_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string TenantId { get; set; } - - /// - /// Workspace display name. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tenant_name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string TenantName { get; set; } - - /// - /// The email address the inviter typed when creating the invite. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("invited_email")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string InvitedEmail { get; set; } - - /// - /// Firebase email of the member who created the invite. May be
- /// absent if the Firebase profile lookup failed transiently —
- /// clients should still render the preview in that case. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("invited_by_email")] - public string? InvitedByEmail { get; set; } - - /// - /// Firebase display name of the member who created the invite. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("invited_by_display_name")] - public string? InvitedByDisplayName { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime ExpiresAt { 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. - /// - /// - /// Opaque workspace id. Safe to echo back on the accept call. - /// - /// - /// Workspace display name. - /// - /// - /// The email address the inviter typed when creating the invite. - /// - /// - /// - /// Firebase email of the member who created the invite. May be
- /// absent if the Firebase profile lookup failed transiently —
- /// clients should still render the preview in that case. - /// - /// - /// Firebase display name of the member who created the invite. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsInvitePreview( - string tenantId, - string tenantName, - string invitedEmail, - global::System.DateTime expiresAt, - string? invitedByEmail, - string? invitedByDisplayName) - { - this.TenantId = tenantId ?? throw new global::System.ArgumentNullException(nameof(tenantId)); - this.TenantName = tenantName ?? throw new global::System.ArgumentNullException(nameof(tenantName)); - this.InvitedEmail = invitedEmail ?? throw new global::System.ArgumentNullException(nameof(invitedEmail)); - this.InvitedByEmail = invitedByEmail; - this.InvitedByDisplayName = invitedByDisplayName; - this.ExpiresAt = expiresAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsInvitePreview() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsInvitesListResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsInvitesListResponse.Json.g.cs deleted file mode 100644 index d267e44..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsInvitesListResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsInvitesListResponse - { - /// - /// 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::Speechify.TtsInvitesListResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsInvitesListResponse), - jsonSerializerContext) as global::Speechify.TtsInvitesListResponse; - } - - /// - /// 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::Speechify.TtsInvitesListResponse? 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::Speechify.TtsInvitesListResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsInvitesListResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsInvitesListResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsInvitesListResponse.g.cs deleted file mode 100644 index e6e2fef..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsInvitesListResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsInvitesListResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("invites")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Invites { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsInvitesListResponse( - global::System.Collections.Generic.IList invites) - { - this.Invites = invites ?? throw new global::System.ArgumentNullException(nameof(invites)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsInvitesListResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBase.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBase.Json.g.cs deleted file mode 100644 index 172a1c0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBase.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsKnowledgeBase - { - /// - /// 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::Speechify.TtsKnowledgeBase? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsKnowledgeBase), - jsonSerializerContext) as global::Speechify.TtsKnowledgeBase; - } - - /// - /// 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::Speechify.TtsKnowledgeBase? 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::Speechify.TtsKnowledgeBase), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsKnowledgeBase; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsKnowledgeBase.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBase.g.cs deleted file mode 100644 index 94e50d4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBase.g.cs +++ /dev/null @@ -1,102 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A bundle of documents that can be attached to one or more voice
- /// agents. Chunks across every document in the knowledge base are
- /// embedded and searched together. - ///
- public sealed partial class TtsKnowledgeBase - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Human-readable label, shown in the console. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// Optional description. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Number of ingested documents. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("document_count")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int DocumentCount { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Human-readable label, shown in the console. - /// - /// - /// Optional description. - /// - /// - /// Number of ingested documents. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsKnowledgeBase( - string id, - string name, - string description, - int documentCount, - global::System.DateTime createdAt, - global::System.DateTime updatedAt) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.DocumentCount = documentCount; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsKnowledgeBase() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseChunk.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseChunk.Json.g.cs deleted file mode 100644 index 5bc2f55..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseChunk.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsKnowledgeBaseChunk - { - /// - /// 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::Speechify.TtsKnowledgeBaseChunk? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsKnowledgeBaseChunk), - jsonSerializerContext) as global::Speechify.TtsKnowledgeBaseChunk; - } - - /// - /// 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::Speechify.TtsKnowledgeBaseChunk? 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::Speechify.TtsKnowledgeBaseChunk), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsKnowledgeBaseChunk; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseChunk.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseChunk.g.cs deleted file mode 100644 index d2823f2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseChunk.g.cs +++ /dev/null @@ -1,84 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsKnowledgeBaseChunk - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("document_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string DocumentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("kb_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string KbId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunk_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ChunkIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsKnowledgeBaseChunk( - string id, - string documentId, - string kbId, - int chunkIndex, - string content) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.DocumentId = documentId ?? throw new global::System.ArgumentNullException(nameof(documentId)); - this.KbId = kbId ?? throw new global::System.ArgumentNullException(nameof(kbId)); - this.ChunkIndex = chunkIndex; - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsKnowledgeBaseChunk() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocument.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocument.Json.g.cs deleted file mode 100644 index eec060a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocument.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsKnowledgeBaseDocument - { - /// - /// 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::Speechify.TtsKnowledgeBaseDocument? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsKnowledgeBaseDocument), - jsonSerializerContext) as global::Speechify.TtsKnowledgeBaseDocument; - } - - /// - /// 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::Speechify.TtsKnowledgeBaseDocument? 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::Speechify.TtsKnowledgeBaseDocument), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsKnowledgeBaseDocument; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocument.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocument.g.cs deleted file mode 100644 index 117880a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocument.g.cs +++ /dev/null @@ -1,146 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsKnowledgeBaseDocument - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("kb_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string KbId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ContentType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("byte_size")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long ByteSize { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("char_count")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int CharCount { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunk_count")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ChunkCount { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsKnowledgeBaseDocumentStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsKnowledgeBaseDocumentStatus Status { get; set; } - - /// - /// Populated when status is failed. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public string? Error { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Populated when status is failed. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsKnowledgeBaseDocument( - string id, - string kbId, - string filename, - string contentType, - long byteSize, - int charCount, - int chunkCount, - global::Speechify.TtsKnowledgeBaseDocumentStatus status, - global::System.DateTime createdAt, - global::System.DateTime updatedAt, - string? error) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.KbId = kbId ?? throw new global::System.ArgumentNullException(nameof(kbId)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - this.ContentType = contentType ?? throw new global::System.ArgumentNullException(nameof(contentType)); - this.ByteSize = byteSize; - this.CharCount = charCount; - this.ChunkCount = chunkCount; - this.Status = status; - this.Error = error; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsKnowledgeBaseDocument() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocumentStatus.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocumentStatus.g.cs deleted file mode 100644 index 9f5e4ae..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseDocumentStatus.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsKnowledgeBaseDocumentStatus - { - /// - /// - /// - Embedding, - /// - /// - /// - Failed, - /// - /// - /// - Ready, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsKnowledgeBaseDocumentStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsKnowledgeBaseDocumentStatus value) - { - return value switch - { - TtsKnowledgeBaseDocumentStatus.Embedding => "embedding", - TtsKnowledgeBaseDocumentStatus.Failed => "failed", - TtsKnowledgeBaseDocumentStatus.Ready => "ready", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsKnowledgeBaseDocumentStatus? ToEnum(string value) - { - return value switch - { - "embedding" => TtsKnowledgeBaseDocumentStatus.Embedding, - "failed" => TtsKnowledgeBaseDocumentStatus.Failed, - "ready" => TtsKnowledgeBaseDocumentStatus.Ready, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseSearchHit.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseSearchHit.Json.g.cs deleted file mode 100644 index 0032fa4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseSearchHit.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsKnowledgeBaseSearchHit - { - /// - /// 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::Speechify.TtsKnowledgeBaseSearchHit? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsKnowledgeBaseSearchHit), - jsonSerializerContext) as global::Speechify.TtsKnowledgeBaseSearchHit; - } - - /// - /// 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::Speechify.TtsKnowledgeBaseSearchHit? 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::Speechify.TtsKnowledgeBaseSearchHit), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsKnowledgeBaseSearchHit; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseSearchHit.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseSearchHit.g.cs deleted file mode 100644 index f3d70ce..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsKnowledgeBaseSearchHit.g.cs +++ /dev/null @@ -1,106 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsKnowledgeBaseSearchHit - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunk_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ChunkId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("document_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string DocumentId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("kb_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string KbId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunk_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ChunkIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// Cosine similarity (higher = more relevant). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Score { 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. - /// - /// - /// - /// - /// - /// - /// - /// - /// Cosine similarity (higher = more relevant). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsKnowledgeBaseSearchHit( - string chunkId, - string documentId, - string kbId, - string filename, - int chunkIndex, - string content, - double score) - { - this.ChunkId = chunkId ?? throw new global::System.ArgumentNullException(nameof(chunkId)); - this.DocumentId = documentId ?? throw new global::System.ArgumentNullException(nameof(documentId)); - this.KbId = kbId ?? throw new global::System.ArgumentNullException(nameof(kbId)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - this.ChunkIndex = chunkIndex; - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.Score = score; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsKnowledgeBaseSearchHit() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestAttachmentsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestAttachmentsResponse.Json.g.cs deleted file mode 100644 index e251b8f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestAttachmentsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListAgentTestAttachmentsResponse - { - /// - /// 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::Speechify.TtsListAgentTestAttachmentsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListAgentTestAttachmentsResponse), - jsonSerializerContext) as global::Speechify.TtsListAgentTestAttachmentsResponse; - } - - /// - /// 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::Speechify.TtsListAgentTestAttachmentsResponse? 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::Speechify.TtsListAgentTestAttachmentsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListAgentTestAttachmentsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListAgentTestAttachmentsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestAttachmentsResponse.g.cs deleted file mode 100644 index 9705b45..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestAttachmentsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListAgentTestAttachmentsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Attachments { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListAgentTestAttachmentsResponse( - global::System.Collections.Generic.IList attachments) - { - this.Attachments = attachments ?? throw new global::System.ArgumentNullException(nameof(attachments)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListAgentTestAttachmentsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestFoldersResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestFoldersResponse.Json.g.cs deleted file mode 100644 index 4f9611f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestFoldersResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListAgentTestFoldersResponse - { - /// - /// 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::Speechify.TtsListAgentTestFoldersResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListAgentTestFoldersResponse), - jsonSerializerContext) as global::Speechify.TtsListAgentTestFoldersResponse; - } - - /// - /// 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::Speechify.TtsListAgentTestFoldersResponse? 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::Speechify.TtsListAgentTestFoldersResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListAgentTestFoldersResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListAgentTestFoldersResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestFoldersResponse.g.cs deleted file mode 100644 index a2cf3bb..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestFoldersResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListAgentTestFoldersResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("folders")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Folders { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListAgentTestFoldersResponse( - global::System.Collections.Generic.IList folders) - { - this.Folders = folders ?? throw new global::System.ArgumentNullException(nameof(folders)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListAgentTestFoldersResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestRunsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestRunsResponse.Json.g.cs deleted file mode 100644 index ddc9b2b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestRunsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListAgentTestRunsResponse - { - /// - /// 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::Speechify.TtsListAgentTestRunsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListAgentTestRunsResponse), - jsonSerializerContext) as global::Speechify.TtsListAgentTestRunsResponse; - } - - /// - /// 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::Speechify.TtsListAgentTestRunsResponse? 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::Speechify.TtsListAgentTestRunsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListAgentTestRunsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListAgentTestRunsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestRunsResponse.g.cs deleted file mode 100644 index fe15e63..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestRunsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListAgentTestRunsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Runs { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListAgentTestRunsResponse( - global::System.Collections.Generic.IList runs) - { - this.Runs = runs ?? throw new global::System.ArgumentNullException(nameof(runs)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListAgentTestRunsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestsResponse.Json.g.cs deleted file mode 100644 index 0a0ae1c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListAgentTestsResponse - { - /// - /// 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::Speechify.TtsListAgentTestsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListAgentTestsResponse), - jsonSerializerContext) as global::Speechify.TtsListAgentTestsResponse; - } - - /// - /// 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::Speechify.TtsListAgentTestsResponse? 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::Speechify.TtsListAgentTestsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListAgentTestsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListAgentTestsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestsResponse.g.cs deleted file mode 100644 index c65c8f0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentTestsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListAgentTestsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tests")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tests { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListAgentTestsResponse( - global::System.Collections.Generic.IList tests) - { - this.Tests = tests ?? throw new global::System.ArgumentNullException(nameof(tests)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListAgentTestsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentsResponse.Json.g.cs deleted file mode 100644 index 3c39e41..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListAgentsResponse - { - /// - /// 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::Speechify.TtsListAgentsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListAgentsResponse), - jsonSerializerContext) as global::Speechify.TtsListAgentsResponse; - } - - /// - /// 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::Speechify.TtsListAgentsResponse? 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::Speechify.TtsListAgentsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListAgentsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListAgentsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentsResponse.g.cs deleted file mode 100644 index b4c5245..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListAgentsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListAgentsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agents")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Agents { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListAgentsResponse( - global::System.Collections.Generic.IList agents) - { - this.Agents = agents ?? throw new global::System.ArgumentNullException(nameof(agents)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListAgentsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListConversationsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListConversationsResponse.Json.g.cs deleted file mode 100644 index 5b9fee6..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListConversationsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListConversationsResponse - { - /// - /// 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::Speechify.TtsListConversationsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListConversationsResponse), - jsonSerializerContext) as global::Speechify.TtsListConversationsResponse; - } - - /// - /// 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::Speechify.TtsListConversationsResponse? 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::Speechify.TtsListConversationsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListConversationsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListConversationsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListConversationsResponse.g.cs deleted file mode 100644 index 72280f2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListConversationsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListConversationsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversations")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Conversations { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListConversationsResponse( - global::System.Collections.Generic.IList conversations) - { - this.Conversations = conversations ?? throw new global::System.ArgumentNullException(nameof(conversations)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListConversationsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListDynamicVariablesResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListDynamicVariablesResponse.Json.g.cs deleted file mode 100644 index cef7498..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListDynamicVariablesResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListDynamicVariablesResponse - { - /// - /// 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::Speechify.TtsListDynamicVariablesResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListDynamicVariablesResponse), - jsonSerializerContext) as global::Speechify.TtsListDynamicVariablesResponse; - } - - /// - /// 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::Speechify.TtsListDynamicVariablesResponse? 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::Speechify.TtsListDynamicVariablesResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListDynamicVariablesResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListDynamicVariablesResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListDynamicVariablesResponse.g.cs deleted file mode 100644 index 836aeb7..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListDynamicVariablesResponse.g.cs +++ /dev/null @@ -1,62 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Response for `GET /v1/agents/{id}/variables`. Returns both the
- /// customer-scope variable catalogue and the read-only `system__*`
- /// catalogue so the editor UI has a single source of truth. - ///
- public sealed partial class TtsListDynamicVariablesResponse - { - /// - /// Customer-defined variables for this agent. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("variables")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Variables { get; set; } - - /// - /// Platform-populated `system__*` variables, provided for
- /// reference. This list is the same for every agent. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("system_variables")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList SystemVariables { 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. - /// - /// - /// Customer-defined variables for this agent. - /// - /// - /// Platform-populated `system__*` variables, provided for
- /// reference. This list is the same for every agent. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListDynamicVariablesResponse( - global::System.Collections.Generic.IList variables, - global::System.Collections.Generic.IList systemVariables) - { - this.Variables = variables ?? throw new global::System.ArgumentNullException(nameof(variables)); - this.SystemVariables = systemVariables ?? throw new global::System.ArgumentNullException(nameof(systemVariables)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListDynamicVariablesResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListEvaluationsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListEvaluationsResponse.Json.g.cs deleted file mode 100644 index e36e211..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListEvaluationsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListEvaluationsResponse - { - /// - /// 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::Speechify.TtsListEvaluationsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListEvaluationsResponse), - jsonSerializerContext) as global::Speechify.TtsListEvaluationsResponse; - } - - /// - /// 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::Speechify.TtsListEvaluationsResponse? 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::Speechify.TtsListEvaluationsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListEvaluationsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListEvaluationsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListEvaluationsResponse.g.cs deleted file mode 100644 index 88a28ae..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListEvaluationsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListEvaluationsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("evaluations")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Evaluations { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListEvaluationsResponse( - global::System.Collections.Generic.IList evaluations) - { - this.Evaluations = evaluations ?? throw new global::System.ArgumentNullException(nameof(evaluations)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListEvaluationsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseChunksResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseChunksResponse.Json.g.cs deleted file mode 100644 index c718a36..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseChunksResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListKnowledgeBaseChunksResponse - { - /// - /// 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::Speechify.TtsListKnowledgeBaseChunksResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListKnowledgeBaseChunksResponse), - jsonSerializerContext) as global::Speechify.TtsListKnowledgeBaseChunksResponse; - } - - /// - /// 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::Speechify.TtsListKnowledgeBaseChunksResponse? 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::Speechify.TtsListKnowledgeBaseChunksResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListKnowledgeBaseChunksResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseChunksResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseChunksResponse.g.cs deleted file mode 100644 index 4129402..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseChunksResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListKnowledgeBaseChunksResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunks")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Chunks { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListKnowledgeBaseChunksResponse( - global::System.Collections.Generic.IList chunks) - { - this.Chunks = chunks ?? throw new global::System.ArgumentNullException(nameof(chunks)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListKnowledgeBaseChunksResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseDocumentsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseDocumentsResponse.Json.g.cs deleted file mode 100644 index 9399256..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseDocumentsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListKnowledgeBaseDocumentsResponse - { - /// - /// 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::Speechify.TtsListKnowledgeBaseDocumentsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListKnowledgeBaseDocumentsResponse), - jsonSerializerContext) as global::Speechify.TtsListKnowledgeBaseDocumentsResponse; - } - - /// - /// 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::Speechify.TtsListKnowledgeBaseDocumentsResponse? 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::Speechify.TtsListKnowledgeBaseDocumentsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListKnowledgeBaseDocumentsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseDocumentsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseDocumentsResponse.g.cs deleted file mode 100644 index 03efafd..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBaseDocumentsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListKnowledgeBaseDocumentsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("documents")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Documents { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListKnowledgeBaseDocumentsResponse( - global::System.Collections.Generic.IList documents) - { - this.Documents = documents ?? throw new global::System.ArgumentNullException(nameof(documents)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListKnowledgeBaseDocumentsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBasesResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBasesResponse.Json.g.cs deleted file mode 100644 index 16146e5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBasesResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListKnowledgeBasesResponse - { - /// - /// 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::Speechify.TtsListKnowledgeBasesResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListKnowledgeBasesResponse), - jsonSerializerContext) as global::Speechify.TtsListKnowledgeBasesResponse; - } - - /// - /// 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::Speechify.TtsListKnowledgeBasesResponse? 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::Speechify.TtsListKnowledgeBasesResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListKnowledgeBasesResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListKnowledgeBasesResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBasesResponse.g.cs deleted file mode 100644 index 3015b00..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListKnowledgeBasesResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListKnowledgeBasesResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("knowledge_bases")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList KnowledgeBases { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListKnowledgeBasesResponse( - global::System.Collections.Generic.IList knowledgeBases) - { - this.KnowledgeBases = knowledgeBases ?? throw new global::System.ArgumentNullException(nameof(knowledgeBases)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListKnowledgeBasesResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListMemoriesResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListMemoriesResponse.Json.g.cs deleted file mode 100644 index 2c3bffd..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListMemoriesResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListMemoriesResponse - { - /// - /// 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::Speechify.TtsListMemoriesResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListMemoriesResponse), - jsonSerializerContext) as global::Speechify.TtsListMemoriesResponse; - } - - /// - /// 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::Speechify.TtsListMemoriesResponse? 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::Speechify.TtsListMemoriesResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListMemoriesResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListMemoriesResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListMemoriesResponse.g.cs deleted file mode 100644 index 04bdc5c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListMemoriesResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListMemoriesResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("memories")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Memories { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListMemoriesResponse( - global::System.Collections.Generic.IList memories) - { - this.Memories = memories ?? throw new global::System.ArgumentNullException(nameof(memories)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListMemoriesResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListMessagesResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListMessagesResponse.Json.g.cs deleted file mode 100644 index 7235fb9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListMessagesResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListMessagesResponse - { - /// - /// 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::Speechify.TtsListMessagesResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListMessagesResponse), - jsonSerializerContext) as global::Speechify.TtsListMessagesResponse; - } - - /// - /// 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::Speechify.TtsListMessagesResponse? 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::Speechify.TtsListMessagesResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListMessagesResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListMessagesResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListMessagesResponse.g.cs deleted file mode 100644 index 9985108..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListMessagesResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListMessagesResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("messages")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Messages { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListMessagesResponse( - global::System.Collections.Generic.IList messages) - { - this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListMessagesResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListTestsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListTestsResponse.Json.g.cs deleted file mode 100644 index 5820797..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListTestsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListTestsResponse - { - /// - /// 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::Speechify.TtsListTestsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListTestsResponse), - jsonSerializerContext) as global::Speechify.TtsListTestsResponse; - } - - /// - /// 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::Speechify.TtsListTestsResponse? 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::Speechify.TtsListTestsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListTestsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListTestsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListTestsResponse.g.cs deleted file mode 100644 index 8ad94af..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListTestsResponse.g.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Workspace-wide paginated list of tests. `next_cursor` is the opaque
- /// page cursor; omit on the first call, then pass through to get the
- /// next page until the field is absent. - ///
- public sealed partial class TtsListTestsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tests")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tests { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] - public string? NextCursor { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListTestsResponse( - global::System.Collections.Generic.IList tests, - string? nextCursor) - { - this.Tests = tests ?? throw new global::System.ArgumentNullException(nameof(tests)); - this.NextCursor = nextCursor; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListTestsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsListToolsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListToolsResponse.Json.g.cs deleted file mode 100644 index 0fb47b2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListToolsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsListToolsResponse - { - /// - /// 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::Speechify.TtsListToolsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsListToolsResponse), - jsonSerializerContext) as global::Speechify.TtsListToolsResponse; - } - - /// - /// 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::Speechify.TtsListToolsResponse? 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::Speechify.TtsListToolsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsListToolsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsListToolsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsListToolsResponse.g.cs deleted file mode 100644 index a9fdcae..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsListToolsResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsListToolsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tools { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsListToolsResponse( - global::System.Collections.Generic.IList tools) - { - this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsListToolsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMember.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMember.Json.g.cs deleted file mode 100644 index ae42423..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMember.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMember - { - /// - /// 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::Speechify.TtsMember? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMember), - jsonSerializerContext) as global::Speechify.TtsMember; - } - - /// - /// 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::Speechify.TtsMember? 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::Speechify.TtsMember), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMember; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMember.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMember.g.cs deleted file mode 100644 index 9a85f54..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMember.g.cs +++ /dev/null @@ -1,111 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A member of a workspace (joined from `tenant_users` + Firebase profile). - /// - public sealed partial class TtsMember - { - /// - /// Firebase user ID. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_uid")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string UserUid { get; set; } - - /// - /// Member's email from Firebase. Empty when the account has been deleted. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - public string? Email { get; set; } - - /// - /// Member's display name from Firebase. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] - public string? DisplayName { get; set; } - - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsMemberRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsMemberRole Role { get; set; } - - /// - /// When the user joined the workspace. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// True when this row is the authenticated caller. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("is_self")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool IsSelf { 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. - /// - /// - /// Firebase user ID. - /// - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - /// - /// - /// When the user joined the workspace. - /// - /// - /// True when this row is the authenticated caller. - /// - /// - /// Member's email from Firebase. Empty when the account has been deleted. - /// - /// - /// Member's display name from Firebase. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsMember( - string userUid, - global::Speechify.TtsMemberRole role, - global::System.DateTime createdAt, - bool isSelf, - string? email, - string? displayName) - { - this.UserUid = userUid ?? throw new global::System.ArgumentNullException(nameof(userUid)); - this.Email = email; - this.DisplayName = displayName; - this.Role = role; - this.CreatedAt = createdAt; - this.IsSelf = isSelf; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsMember() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMemberRole.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMemberRole.g.cs deleted file mode 100644 index 38d2ca8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMemberRole.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - ///
- public enum TtsMemberRole - { - /// - /// - /// - Admin, - /// - /// - /// - Member, - /// - /// - /// - Owner, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsMemberRoleExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsMemberRole value) - { - return value switch - { - TtsMemberRole.Admin => "admin", - TtsMemberRole.Member => "member", - TtsMemberRole.Owner => "owner", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsMemberRole? ToEnum(string value) - { - return value switch - { - "admin" => TtsMemberRole.Admin, - "member" => TtsMemberRole.Member, - "owner" => TtsMemberRole.Owner, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMembersListResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMembersListResponse.Json.g.cs deleted file mode 100644 index b878503..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMembersListResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMembersListResponse - { - /// - /// 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::Speechify.TtsMembersListResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMembersListResponse), - jsonSerializerContext) as global::Speechify.TtsMembersListResponse; - } - - /// - /// 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::Speechify.TtsMembersListResponse? 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::Speechify.TtsMembersListResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMembersListResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMembersListResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMembersListResponse.g.cs deleted file mode 100644 index 330ae9a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMembersListResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsMembersListResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("members")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Members { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsMembersListResponse( - global::System.Collections.Generic.IList members) - { - this.Members = members ?? throw new global::System.ArgumentNullException(nameof(members)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsMembersListResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMemory.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMemory.Json.g.cs deleted file mode 100644 index d952b39..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMemory.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMemory - { - /// - /// 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::Speechify.TtsMemory? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMemory), - jsonSerializerContext) as global::Speechify.TtsMemory; - } - - /// - /// 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::Speechify.TtsMemory? 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::Speechify.TtsMemory), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMemory; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMemory.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMemory.g.cs deleted file mode 100644 index 7918c94..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMemory.g.cs +++ /dev/null @@ -1,125 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One salient fact extracted post-call about a specific caller on
- /// a specific agent. Retrieved at the next conversation-start for
- /// the same caller and injected into the agent's system prompt via
- /// the `{{memory}}` template variable. - ///
- public sealed partial class TtsMemory - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentId { get; set; } - - /// - /// Stable caller key (LiveKit participant identity) the memory is scoped to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("caller_identity")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string CallerIdentity { get; set; } - - /// - /// Short third-person statement about the caller. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("fact")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Fact { get; set; } - - /// - /// Conversation the memory was extracted from (may be empty if the source was deleted). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("source_conversation_id")] - public string? SourceConversationId { get; set; } - - /// - /// LLM self-reported 0-1 confidence in the fact's durability and relevance. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("confidence")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Confidence { get; set; } - - /// - /// Populated only on retrieval hits — recency-weighted cosine similarity. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - public double? Score { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// Stable caller key (LiveKit participant identity) the memory is scoped to. - /// - /// - /// Short third-person statement about the caller. - /// - /// - /// LLM self-reported 0-1 confidence in the fact's durability and relevance. - /// - /// - /// - /// Conversation the memory was extracted from (may be empty if the source was deleted). - /// - /// - /// Populated only on retrieval hits — recency-weighted cosine similarity. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsMemory( - string id, - string agentId, - string callerIdentity, - string fact, - double confidence, - global::System.DateTime createdAt, - string? sourceConversationId, - double? score) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); - this.CallerIdentity = callerIdentity ?? throw new global::System.ArgumentNullException(nameof(callerIdentity)); - this.Fact = fact ?? throw new global::System.ArgumentNullException(nameof(fact)); - this.SourceConversationId = sourceConversationId; - this.Confidence = confidence; - this.Score = score; - this.CreatedAt = createdAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsMemory() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMessage.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessage.Json.g.cs deleted file mode 100644 index 9aac205..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessage.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMessage - { - /// - /// 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::Speechify.TtsMessage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMessage), - jsonSerializerContext) as global::Speechify.TtsMessage; - } - - /// - /// 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::Speechify.TtsMessage? 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::Speechify.TtsMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMessage; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMessage.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessage.g.cs deleted file mode 100644 index a9ae13a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessage.g.cs +++ /dev/null @@ -1,123 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsMessage - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ConversationId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsMessageRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsMessageRole Role { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_name")] - public string? ToolName { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_args")] - public object? ToolArgs { get; set; } - - /// - /// Arbitrary JSON value returned by the tool (object, array, string, or primitive). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_result")] - public object? ToolResult { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("started_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime StartedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("ended_at")] - public global::System.DateTime? EndedAt { 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. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Arbitrary JSON value returned by the tool (object, array, string, or primitive). - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsMessage( - string id, - string conversationId, - global::Speechify.TtsMessageRole role, - string content, - global::System.DateTime startedAt, - string? toolName, - object? toolArgs, - object? toolResult, - global::System.DateTime? endedAt) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.ConversationId = conversationId ?? throw new global::System.ArgumentNullException(nameof(conversationId)); - this.Role = role; - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.ToolName = toolName; - this.ToolArgs = toolArgs; - this.ToolResult = toolResult; - this.StartedAt = startedAt; - this.EndedAt = endedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsMessage() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageRole.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessageRole.g.cs deleted file mode 100644 index 7ebd69e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageRole.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsMessageRole - { - /// - /// - /// - Assistant, - /// - /// - /// - System, - /// - /// - /// - Tool, - /// - /// - /// - User, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsMessageRoleExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsMessageRole value) - { - return value switch - { - TtsMessageRole.Assistant => "assistant", - TtsMessageRole.System => "system", - TtsMessageRole.Tool => "tool", - TtsMessageRole.User => "user", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsMessageRole? ToEnum(string value) - { - return value switch - { - "assistant" => TtsMessageRole.Assistant, - "system" => TtsMessageRole.System, - "tool" => TtsMessageRole.Tool, - "user" => TtsMessageRole.User, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs.Json.g.cs deleted file mode 100644 index 85e90a6..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMessageToolArgs - { - /// - /// 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::Speechify.TtsMessageToolArgs? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMessageToolArgs), - jsonSerializerContext) as global::Speechify.TtsMessageToolArgs; - } - - /// - /// 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::Speechify.TtsMessageToolArgs? 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::Speechify.TtsMessageToolArgs), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMessageToolArgs; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMessageToolArgs2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs2.Json.g.cs deleted file mode 100644 index 4a2046f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMessageToolArgs2 - { - /// - /// 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::Speechify.TtsMessageToolArgs2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMessageToolArgs2), - jsonSerializerContext) as global::Speechify.TtsMessageToolArgs2; - } - - /// - /// 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::Speechify.TtsMessageToolArgs2? 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::Speechify.TtsMessageToolArgs2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMessageToolArgs2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMessageToolArgs2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs2.g.cs deleted file mode 100644 index 2a23326..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolArgs2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsMessageToolArgs2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolResult.Json.g.cs deleted file mode 100644 index 9a6806e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMessageToolResult - { - /// - /// 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::Speechify.TtsMessageToolResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMessageToolResult), - jsonSerializerContext) as global::Speechify.TtsMessageToolResult; - } - - /// - /// 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::Speechify.TtsMessageToolResult? 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::Speechify.TtsMessageToolResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMessageToolResult; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMessageToolResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolResult.g.cs deleted file mode 100644 index a9ed6d8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMessageToolResult.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsMessageToolResult - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMockingStrategy.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMockingStrategy.g.cs deleted file mode 100644 index 734c5fa..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMockingStrategy.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Controls which tool calls the runner intercepts during a run.
- /// System tools (`end_call`, `transfer_to_number`, etc.) are never
- /// mocked regardless of strategy.
- /// - `none` - no interception; all tools are called normally.
- /// - `all` - every non-system tool call is intercepted and matched
- /// against the `mocks` list.
- /// - `selected` - only tools explicitly listed in `mocks` are
- /// intercepted; others are called normally. - ///
- public enum TtsMockingStrategy - { - /// - /// - /// - All, - /// - /// - /// - None, - /// - /// - /// - Selected, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsMockingStrategyExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsMockingStrategy value) - { - return value switch - { - TtsMockingStrategy.All => "all", - TtsMockingStrategy.None => "none", - TtsMockingStrategy.Selected => "selected", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsMockingStrategy? ToEnum(string value) - { - return value switch - { - "all" => TtsMockingStrategy.All, - "none" => TtsMockingStrategy.None, - "selected" => TtsMockingStrategy.Selected, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsMoveAgentTestRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMoveAgentTestRequest.Json.g.cs deleted file mode 100644 index e9ea304..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMoveAgentTestRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsMoveAgentTestRequest - { - /// - /// 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::Speechify.TtsMoveAgentTestRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsMoveAgentTestRequest), - jsonSerializerContext) as global::Speechify.TtsMoveAgentTestRequest; - } - - /// - /// 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::Speechify.TtsMoveAgentTestRequest? 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::Speechify.TtsMoveAgentTestRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsMoveAgentTestRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsMoveAgentTestRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsMoveAgentTestRequest.g.cs deleted file mode 100644 index f8414d5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsMoveAgentTestRequest.g.cs +++ /dev/null @@ -1,43 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Body for `POST /v1/tests/{id}/move`. `folder_id: null` moves the test to root. - /// - public sealed partial class TtsMoveAgentTestRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("folder_id")] - public string? FolderId { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsMoveAgentTestRequest( - string? folderId) - { - this.FolderId = folderId; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsMoveAgentTestRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsNestedChunk.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsNestedChunk.g.cs index f8e84fb..0abc2b7 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsNestedChunk.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsNestedChunk.g.cs @@ -84,5 +84,6 @@ public TtsNestedChunk( public TtsNestedChunk() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsNoMatchBehavior.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsNoMatchBehavior.g.cs deleted file mode 100644 index 87ea000..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsNoMatchBehavior.g.cs +++ /dev/null @@ -1,66 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Fallback when a mockable tool is called but no configured mock
- /// matches the call arguments.
- /// - `call_real_tool` - pass-through: actually invoke the underlying tool.
- /// - `finish_with_error` - fail: short-circuit the run to an `error`
- /// status. Useful when a test wants to assert that a specific mocked
- /// response path is taken - any unmocked tool call aborts the run.
- /// - `skip` - return an empty stub (`{"skipped":true}`) to the agent so
- /// the simulation proceeds without treating the call as a failure.
- /// Useful when a tool's output is irrelevant to the behaviour under
- /// test but the model may still decide to call it. - ///
- public enum TtsNoMatchBehavior - { - /// - /// actually invoke the underlying tool. - /// - CallRealTool, - /// - /// short-circuit the run to an `error` - /// - FinishWithError, - /// - /// true}`) to the agent so - /// - Skip, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsNoMatchBehaviorExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsNoMatchBehavior value) - { - return value switch - { - TtsNoMatchBehavior.CallRealTool => "call_real_tool", - TtsNoMatchBehavior.FinishWithError => "finish_with_error", - TtsNoMatchBehavior.Skip => "skip", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsNoMatchBehavior? ToEnum(string value) - { - return value switch - { - "call_real_tool" => TtsNoMatchBehavior.CallRealTool, - "finish_with_error" => TtsNoMatchBehavior.FinishWithError, - "skip" => TtsNoMatchBehavior.Skip, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthError.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthError.Json.g.cs deleted file mode 100644 index 0cf1786..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthError.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsOAuthError - { - /// - /// 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::Speechify.TtsOAuthError? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsOAuthError), - jsonSerializerContext) as global::Speechify.TtsOAuthError; - } - - /// - /// 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::Speechify.TtsOAuthError? 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::Speechify.TtsOAuthError), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsOAuthError; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsOAuthError.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthError.g.cs deleted file mode 100644 index 4a88cbd..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthError.g.cs +++ /dev/null @@ -1,53 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsOAuthError - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsOAuthErrorErrorJsonConverter))] - public global::Speechify.TtsOAuthErrorError? Error { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error_description")] - public string? ErrorDescription { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsOAuthError( - global::Speechify.TtsOAuthErrorError? error, - string? errorDescription) - { - this.Error = error; - this.ErrorDescription = errorDescription; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsOAuthError() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthErrorError.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthErrorError.g.cs deleted file mode 100644 index 40aae39..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsOAuthErrorError.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsOAuthErrorError - { - /// - /// - /// - InvalidClient, - /// - /// - /// - InvalidRequest, - /// - /// - /// - InvalidScope, - /// - /// - /// - UnauthorizedClient, - /// - /// - /// - UnsupportedGrantType, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsOAuthErrorErrorExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsOAuthErrorError value) - { - return value switch - { - TtsOAuthErrorError.InvalidClient => "invalid_client", - TtsOAuthErrorError.InvalidRequest => "invalid_request", - TtsOAuthErrorError.InvalidScope => "invalid_scope", - TtsOAuthErrorError.UnauthorizedClient => "unauthorized_client", - TtsOAuthErrorError.UnsupportedGrantType => "unsupported_grant_type", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsOAuthErrorError? ToEnum(string value) - { - return value switch - { - "invalid_client" => TtsOAuthErrorError.InvalidClient, - "invalid_request" => TtsOAuthErrorError.InvalidRequest, - "invalid_scope" => TtsOAuthErrorError.InvalidScope, - "unauthorized_client" => TtsOAuthErrorError.UnauthorizedClient, - "unsupported_grant_type" => TtsOAuthErrorError.UnsupportedGrantType, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheck.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheck.Json.g.cs deleted file mode 100644 index 947ddf3..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheck.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsParameterCheck - { - /// - /// 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::Speechify.TtsParameterCheck? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsParameterCheck), - jsonSerializerContext) as global::Speechify.TtsParameterCheck; - } - - /// - /// 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::Speechify.TtsParameterCheck? 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::Speechify.TtsParameterCheck), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsParameterCheck; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsParameterCheck.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheck.g.cs deleted file mode 100644 index 3832642..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheck.g.cs +++ /dev/null @@ -1,92 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Validates one argument of an expected tool call. `path` is a
- /// dotted JSON path (e.g. `customer.email`); use zero-indexed
- /// notation for arrays (`items.0.sku`). An empty path checks the
- /// whole args object. - ///
- public sealed partial class TtsParameterCheck - { - /// - /// Dotted JSON path to the argument being checked. Empty means the whole args object. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("path")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Path { get; set; } - - /// - /// How a `ParameterCheck` validates a tool argument.
- /// - `exact` - JSON equality.
- /// - `regex` - the argument stringified is matched against the pattern.
- /// - `llm` - an LLM judge decides whether the value semantically satisfies
- /// the criteria (e.g. "is a plausible email address"). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("mode")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsParameterCheckModeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsParameterCheckMode Mode { get; set; } - - /// - /// Expected value string for `exact` and `regex` modes. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expected")] - public string? Expected { get; set; } - - /// - /// Natural-language criteria for `llm` mode (e.g. "is a valid email address"). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("criteria")] - public string? Criteria { 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. - /// - /// - /// Dotted JSON path to the argument being checked. Empty means the whole args object. - /// - /// - /// How a `ParameterCheck` validates a tool argument.
- /// - `exact` - JSON equality.
- /// - `regex` - the argument stringified is matched against the pattern.
- /// - `llm` - an LLM judge decides whether the value semantically satisfies
- /// the criteria (e.g. "is a plausible email address"). - /// - /// - /// Expected value string for `exact` and `regex` modes. - /// - /// - /// Natural-language criteria for `llm` mode (e.g. "is a valid email address"). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsParameterCheck( - string path, - global::Speechify.TtsParameterCheckMode mode, - string? expected, - string? criteria) - { - this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); - this.Mode = mode; - this.Expected = expected; - this.Criteria = criteria; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsParameterCheck() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckMode.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckMode.g.cs deleted file mode 100644 index 514d42b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckMode.g.cs +++ /dev/null @@ -1,61 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// How a `ParameterCheck` validates a tool argument.
- /// - `exact` - JSON equality.
- /// - `regex` - the argument stringified is matched against the pattern.
- /// - `llm` - an LLM judge decides whether the value semantically satisfies
- /// the criteria (e.g. "is a plausible email address"). - ///
- public enum TtsParameterCheckMode - { - /// - /// - /// - Exact, - /// - /// - /// - Llm, - /// - /// - /// - Regex, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsParameterCheckModeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsParameterCheckMode value) - { - return value switch - { - TtsParameterCheckMode.Exact => "exact", - TtsParameterCheckMode.Llm => "llm", - TtsParameterCheckMode.Regex => "regex", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsParameterCheckMode? ToEnum(string value) - { - return value switch - { - "exact" => TtsParameterCheckMode.Exact, - "llm" => TtsParameterCheckMode.Llm, - "regex" => TtsParameterCheckMode.Regex, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckResult.Json.g.cs deleted file mode 100644 index ecf8268..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsParameterCheckResult - { - /// - /// 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::Speechify.TtsParameterCheckResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsParameterCheckResult), - jsonSerializerContext) as global::Speechify.TtsParameterCheckResult; - } - - /// - /// 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::Speechify.TtsParameterCheckResult? 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::Speechify.TtsParameterCheckResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsParameterCheckResult; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsParameterCheckResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckResult.g.cs deleted file mode 100644 index e133235..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsParameterCheckResult.g.cs +++ /dev/null @@ -1,98 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Result of one `ParameterCheck` within a tool-call test run. - /// - public sealed partial class TtsParameterCheckResult - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("path")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Path { get; set; } - - /// - /// How a `ParameterCheck` validates a tool argument.
- /// - `exact` - JSON equality.
- /// - `regex` - the argument stringified is matched against the pattern.
- /// - `llm` - an LLM judge decides whether the value semantically satisfies
- /// the criteria (e.g. "is a plausible email address"). - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("mode")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsParameterCheckModeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsParameterCheckMode Mode { get; set; } - - /// - /// JSON-serialised actual value at `path`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("actual_json")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ActualJson { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Passed { get; set; } - - /// - /// LLM rationale (populated for `llm` mode checks). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rationale")] - public string? Rationale { 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. - /// - /// - /// - /// How a `ParameterCheck` validates a tool argument.
- /// - `exact` - JSON equality.
- /// - `regex` - the argument stringified is matched against the pattern.
- /// - `llm` - an LLM judge decides whether the value semantically satisfies
- /// the criteria (e.g. "is a plausible email address"). - /// - /// - /// JSON-serialised actual value at `path`. - /// - /// - /// - /// LLM rationale (populated for `llm` mode checks). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsParameterCheckResult( - string path, - global::Speechify.TtsParameterCheckMode mode, - string actualJson, - bool passed, - string? rationale) - { - this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); - this.Mode = mode; - this.ActualJson = actualJson ?? throw new global::System.ArgumentNullException(nameof(actualJson)); - this.Passed = passed; - this.Rationale = rationale; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsParameterCheckResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsRunAgentTestsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsRunAgentTestsResponse.Json.g.cs deleted file mode 100644 index bd961ac..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsRunAgentTestsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsRunAgentTestsResponse - { - /// - /// 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::Speechify.TtsRunAgentTestsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsRunAgentTestsResponse), - jsonSerializerContext) as global::Speechify.TtsRunAgentTestsResponse; - } - - /// - /// 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::Speechify.TtsRunAgentTestsResponse? 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::Speechify.TtsRunAgentTestsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsRunAgentTestsResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsRunAgentTestsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsRunAgentTestsResponse.g.cs deleted file mode 100644 index 7fd8a78..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsRunAgentTestsResponse.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Response from `POST /v1/agents/{id}/tests/runs`. Contains every
- /// newly-queued run so the client can poll each for completion.
- /// Capped at 50 runs per call. - ///
- public sealed partial class TtsRunAgentTestsResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Runs { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsRunAgentTestsResponse( - global::System.Collections.Generic.IList runs) - { - this.Runs = runs ?? throw new global::System.ArgumentNullException(nameof(runs)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsRunAgentTestsResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchRequest.Json.g.cs deleted file mode 100644 index 605940d..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsRunBatchRequest - { - /// - /// 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::Speechify.TtsRunBatchRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsRunBatchRequest), - jsonSerializerContext) as global::Speechify.TtsRunBatchRequest; - } - - /// - /// 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::Speechify.TtsRunBatchRequest? 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::Speechify.TtsRunBatchRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsRunBatchRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsRunBatchRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchRequest.g.cs deleted file mode 100644 index e340ba2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchRequest.g.cs +++ /dev/null @@ -1,45 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Batch-run payload. Total expanded runs across all entries are
- /// capped at 100 per call. - ///
- public sealed partial class TtsRunBatchRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("entries")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Entries { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsRunBatchRequest( - global::System.Collections.Generic.IList entries) - { - this.Entries = entries ?? throw new global::System.ArgumentNullException(nameof(entries)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsRunBatchRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchResponse.Json.g.cs deleted file mode 100644 index 5ffb51f..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsRunBatchResponse - { - /// - /// 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::Speechify.TtsRunBatchResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsRunBatchResponse), - jsonSerializerContext) as global::Speechify.TtsRunBatchResponse; - } - - /// - /// 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::Speechify.TtsRunBatchResponse? 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::Speechify.TtsRunBatchResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsRunBatchResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsRunBatchResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchResponse.g.cs deleted file mode 100644 index 5fbe12c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsRunBatchResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsRunBatchResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Runs { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsRunBatchResponse( - global::System.Collections.Generic.IList runs) - { - this.Runs = runs ?? throw new global::System.ArgumentNullException(nameof(runs)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsRunBatchResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioConfig.Json.g.cs deleted file mode 100644 index 58c6ece..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsScenarioConfig - { - /// - /// 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::Speechify.TtsScenarioConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsScenarioConfig), - jsonSerializerContext) as global::Speechify.TtsScenarioConfig; - } - - /// - /// 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::Speechify.TtsScenarioConfig? 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::Speechify.TtsScenarioConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsScenarioConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsScenarioConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioConfig.g.cs deleted file mode 100644 index 3cbe7a2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioConfig.g.cs +++ /dev/null @@ -1,129 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Configuration for a `scenario` test. The runner sends `context` as
- /// a user message and asks an LLM judge to evaluate the agent response
- /// against `success_criteria`. Optional few-shot examples sharpen the
- /// judge's calibration. Use `initial_chat_history` to prepend prior
- /// turns before `context`; when the history already ends with a user
- /// message, `context` may be omitted and the agent is evaluated on
- /// its reply to that last history turn. - ///
- public sealed partial class TtsScenarioConfig - { - /// - /// User message sent to the agent to trigger the behaviour under test. Optional when `initial_chat_history` already ends with a user message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("context")] - public string? Context { get; set; } - - /// - /// Natural-language description of what a passing agent response looks like. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("success_criteria")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string SuccessCriteria { get; set; } - - /// - /// Concrete examples of passing responses (few-shot for the judge). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("success_examples")] - public global::System.Collections.Generic.IList? SuccessExamples { get; set; } - - /// - /// Concrete examples of failing responses (few-shot for the judge). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("failure_examples")] - public global::System.Collections.Generic.IList? FailureExamples { get; set; } - - /// - /// Optional seed conversation prepended before `context`. Lets you test the agent's reply mid-conversation rather than on a cold single-turn prompt. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("initial_chat_history")] - public global::System.Collections.Generic.IList? InitialChatHistory { get; set; } - - /// - /// Replaces the agent's system prompt for this run only. Useful for regression-isolating prompt changes. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("system_prompt_override")] - public string? SystemPromptOverride { get; set; } - - /// - /// Replaces the agent's first message for this run only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_message_override")] - public string? FirstMessageOverride { get; set; } - - /// - /// Overrides the LLM model used by the agent for this run only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_override")] - public string? ModelOverride { 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. - /// - /// - /// Natural-language description of what a passing agent response looks like. - /// - /// - /// User message sent to the agent to trigger the behaviour under test. Optional when `initial_chat_history` already ends with a user message. - /// - /// - /// Concrete examples of passing responses (few-shot for the judge). - /// - /// - /// Concrete examples of failing responses (few-shot for the judge). - /// - /// - /// Optional seed conversation prepended before `context`. Lets you test the agent's reply mid-conversation rather than on a cold single-turn prompt. - /// - /// - /// Replaces the agent's system prompt for this run only. Useful for regression-isolating prompt changes. - /// - /// - /// Replaces the agent's first message for this run only. - /// - /// - /// Overrides the LLM model used by the agent for this run only. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsScenarioConfig( - string successCriteria, - string? context, - global::System.Collections.Generic.IList? successExamples, - global::System.Collections.Generic.IList? failureExamples, - global::System.Collections.Generic.IList? initialChatHistory, - string? systemPromptOverride, - string? firstMessageOverride, - string? modelOverride) - { - this.Context = context; - this.SuccessCriteria = successCriteria ?? throw new global::System.ArgumentNullException(nameof(successCriteria)); - this.SuccessExamples = successExamples; - this.FailureExamples = failureExamples; - this.InitialChatHistory = initialChatHistory; - this.SystemPromptOverride = systemPromptOverride; - this.FirstMessageOverride = firstMessageOverride; - this.ModelOverride = modelOverride; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsScenarioConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioResult.Json.g.cs deleted file mode 100644 index 6272c5b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsScenarioResult - { - /// - /// 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::Speechify.TtsScenarioResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsScenarioResult), - jsonSerializerContext) as global::Speechify.TtsScenarioResult; - } - - /// - /// 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::Speechify.TtsScenarioResult? 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::Speechify.TtsScenarioResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsScenarioResult; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsScenarioResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioResult.g.cs deleted file mode 100644 index 0fbef6e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsScenarioResult.g.cs +++ /dev/null @@ -1,92 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Result details for a `scenario` test run. - /// - public sealed partial class TtsScenarioResult - { - /// - /// The raw text response the agent produced. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("agent_response")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string AgentResponse { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Passed { get; set; } - - /// - /// LLM judge's explanation of the verdict. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rationale")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Rationale { get; set; } - - /// - /// 0-1 judge confidence score. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Score { get; set; } - - /// - /// Wall-clock time for the run in milliseconds. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long DurationMs { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The raw text response the agent produced. - /// - /// - /// - /// LLM judge's explanation of the verdict. - /// - /// - /// 0-1 judge confidence score. - /// - /// - /// Wall-clock time for the run in milliseconds. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsScenarioResult( - string agentResponse, - bool passed, - string rationale, - double score, - long durationMs) - { - this.AgentResponse = agentResponse ?? throw new global::System.ArgumentNullException(nameof(agentResponse)); - this.Passed = passed; - this.Rationale = rationale ?? throw new global::System.ArgumentNullException(nameof(rationale)); - this.Score = score; - this.DurationMs = durationMs; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsScenarioResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesRequest.Json.g.cs deleted file mode 100644 index f3206c1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSearchKnowledgeBasesRequest - { - /// - /// 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::Speechify.TtsSearchKnowledgeBasesRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSearchKnowledgeBasesRequest), - jsonSerializerContext) as global::Speechify.TtsSearchKnowledgeBasesRequest; - } - - /// - /// 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::Speechify.TtsSearchKnowledgeBasesRequest? 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::Speechify.TtsSearchKnowledgeBasesRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSearchKnowledgeBasesRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesRequest.g.cs deleted file mode 100644 index 15c6258..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesRequest.g.cs +++ /dev/null @@ -1,71 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsSearchKnowledgeBasesRequest - { - /// - /// Natural-language search query. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("query")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Query { get; set; } - - /// - /// Knowledge bases to search across. Results scoped to caller-owned entries; unknown IDs are silently ignored. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("kb_ids")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList KbIds { get; set; } - - /// - /// Max hits to return (default 5, capped at 50).
- /// Default Value: 5 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("top_k")] - public int? TopK { 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. - /// - /// - /// Natural-language search query. - /// - /// - /// Knowledge bases to search across. Results scoped to caller-owned entries; unknown IDs are silently ignored. - /// - /// - /// Max hits to return (default 5, capped at 50).
- /// Default Value: 5 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSearchKnowledgeBasesRequest( - string query, - global::System.Collections.Generic.IList kbIds, - int? topK) - { - this.Query = query ?? throw new global::System.ArgumentNullException(nameof(query)); - this.KbIds = kbIds ?? throw new global::System.ArgumentNullException(nameof(kbIds)); - this.TopK = topK; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSearchKnowledgeBasesRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesResponse.Json.g.cs deleted file mode 100644 index 006e44e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSearchKnowledgeBasesResponse - { - /// - /// 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::Speechify.TtsSearchKnowledgeBasesResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSearchKnowledgeBasesResponse), - jsonSerializerContext) as global::Speechify.TtsSearchKnowledgeBasesResponse; - } - - /// - /// 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::Speechify.TtsSearchKnowledgeBasesResponse? 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::Speechify.TtsSearchKnowledgeBasesResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSearchKnowledgeBasesResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesResponse.g.cs deleted file mode 100644 index 534f26b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSearchKnowledgeBasesResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsSearchKnowledgeBasesResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("hits")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Hits { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSearchKnowledgeBasesResponse( - global::System.Collections.Generic.IList hits) - { - this.Hits = hits ?? throw new global::System.ArgumentNullException(nameof(hits)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSearchKnowledgeBasesResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationConfig.Json.g.cs deleted file mode 100644 index 11257e1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSimulationConfig - { - /// - /// 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::Speechify.TtsSimulationConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSimulationConfig), - jsonSerializerContext) as global::Speechify.TtsSimulationConfig; - } - - /// - /// 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::Speechify.TtsSimulationConfig? 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::Speechify.TtsSimulationConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSimulationConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSimulationConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationConfig.g.cs deleted file mode 100644 index c4031a9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationConfig.g.cs +++ /dev/null @@ -1,110 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Configuration for a `simulation` test. An AI caller drives a
- /// multi-turn conversation with the agent according to `scenario`.
- /// After `max_turns` exchanges (or when the agent ends the call), an
- /// LLM judge evaluates whether `success_condition` was met.
- /// Use `initial_chat_history` to seed the conversation at a specific
- /// mid-flow state. - ///
- public sealed partial class TtsSimulationConfig - { - /// - /// Instructions for the AI caller describing who they are and what they want. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("scenario")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Scenario { get; set; } - - /// - /// Natural-language description of what a passing conversation looks like. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("success_condition")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string SuccessCondition { get; set; } - - /// - /// Maximum agent turns before the simulation is cut off and judged.
- /// Default Value: 5 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("max_turns")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int MaxTurns { get; set; } - - /// - /// Optional seed conversation that precedes the AI caller's first generated message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("initial_chat_history")] - public global::System.Collections.Generic.IList? InitialChatHistory { get; set; } - - /// - /// Replaces the agent's system prompt for this run only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("system_prompt_override")] - public string? SystemPromptOverride { get; set; } - - /// - /// Overrides the LLM model used by the agent for this run only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_override")] - public string? ModelOverride { 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. - /// - /// - /// Instructions for the AI caller describing who they are and what they want. - /// - /// - /// Natural-language description of what a passing conversation looks like. - /// - /// - /// Maximum agent turns before the simulation is cut off and judged.
- /// Default Value: 5 - /// - /// - /// Optional seed conversation that precedes the AI caller's first generated message. - /// - /// - /// Replaces the agent's system prompt for this run only. - /// - /// - /// Overrides the LLM model used by the agent for this run only. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSimulationConfig( - string scenario, - string successCondition, - int maxTurns, - global::System.Collections.Generic.IList? initialChatHistory, - string? systemPromptOverride, - string? modelOverride) - { - this.Scenario = scenario ?? throw new global::System.ArgumentNullException(nameof(scenario)); - this.SuccessCondition = successCondition ?? throw new global::System.ArgumentNullException(nameof(successCondition)); - this.MaxTurns = maxTurns; - this.InitialChatHistory = initialChatHistory; - this.SystemPromptOverride = systemPromptOverride; - this.ModelOverride = modelOverride; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSimulationConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessage.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessage.Json.g.cs deleted file mode 100644 index 2a5b9de..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessage.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSimulationMessage - { - /// - /// 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::Speechify.TtsSimulationMessage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSimulationMessage), - jsonSerializerContext) as global::Speechify.TtsSimulationMessage; - } - - /// - /// 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::Speechify.TtsSimulationMessage? 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::Speechify.TtsSimulationMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSimulationMessage; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSimulationMessage.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessage.g.cs deleted file mode 100644 index 3641fe5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessage.g.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One turn in a simulation conversation. `role` is `user` (the AI caller) or `assistant` (the agent). - /// - public sealed partial class TtsSimulationMessage - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsSimulationMessageRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsSimulationMessageRole Role { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSimulationMessage( - global::Speechify.TtsSimulationMessageRole role, - string content) - { - this.Role = role; - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSimulationMessage() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessageRole.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessageRole.g.cs deleted file mode 100644 index bd4c268..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationMessageRole.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsSimulationMessageRole - { - /// - /// - /// - Assistant, - /// - /// - /// - User, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsSimulationMessageRoleExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsSimulationMessageRole value) - { - return value switch - { - TtsSimulationMessageRole.Assistant => "assistant", - TtsSimulationMessageRole.User => "user", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsSimulationMessageRole? ToEnum(string value) - { - return value switch - { - "assistant" => TtsSimulationMessageRole.Assistant, - "user" => TtsSimulationMessageRole.User, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationResult.Json.g.cs deleted file mode 100644 index 3f21bd3..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSimulationResult - { - /// - /// 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::Speechify.TtsSimulationResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSimulationResult), - jsonSerializerContext) as global::Speechify.TtsSimulationResult; - } - - /// - /// 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::Speechify.TtsSimulationResult? 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::Speechify.TtsSimulationResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSimulationResult; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSimulationResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationResult.g.cs deleted file mode 100644 index c57ba30..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationResult.g.cs +++ /dev/null @@ -1,101 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Result details for a `simulation` test run. - /// - public sealed partial class TtsSimulationResult - { - /// - /// Full synthetic conversation in order. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("transcript")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Transcript { get; set; } - - /// - /// Every tool invocation across all turns. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] - public global::System.Collections.Generic.IList? ToolCalls { get; set; } - - /// - /// Number of agent turns that ran before the simulation ended. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("turns_used")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int TurnsUsed { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Passed { get; set; } - - /// - /// LLM judge's explanation of the verdict. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rationale")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Rationale { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long DurationMs { 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. - /// - /// - /// Full synthetic conversation in order. - /// - /// - /// Number of agent turns that ran before the simulation ended. - /// - /// - /// - /// LLM judge's explanation of the verdict. - /// - /// - /// - /// Every tool invocation across all turns. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSimulationResult( - global::System.Collections.Generic.IList transcript, - int turnsUsed, - bool passed, - string rationale, - long durationMs, - global::System.Collections.Generic.IList? toolCalls) - { - this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); - this.ToolCalls = toolCalls; - this.TurnsUsed = turnsUsed; - this.Passed = passed; - this.Rationale = rationale ?? throw new global::System.ArgumentNullException(nameof(rationale)); - this.DurationMs = durationMs; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSimulationResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCall.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCall.Json.g.cs deleted file mode 100644 index 9509d38..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCall.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSimulationToolCall - { - /// - /// 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::Speechify.TtsSimulationToolCall? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSimulationToolCall), - jsonSerializerContext) as global::Speechify.TtsSimulationToolCall; - } - - /// - /// 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::Speechify.TtsSimulationToolCall? 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::Speechify.TtsSimulationToolCall), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSimulationToolCall; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSimulationToolCall.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCall.g.cs deleted file mode 100644 index d9ab12e..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCall.g.cs +++ /dev/null @@ -1,92 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One tool invocation that occurred during a simulation run.
- /// `mocked` is true when the call was intercepted by the run's
- /// mock config; false when the real tool was called or when the
- /// tool is a system tool. - ///
- public sealed partial class TtsSimulationToolCall - { - /// - /// Zero-based index of the conversation turn in which this call occurred. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("turn_index")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int TurnIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ToolName { get; set; } - - /// - /// Arguments passed to the tool, as a JSON object. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("args")] - [global::System.Text.Json.Serialization.JsonRequired] - public required object Args { get; set; } - - /// - /// Response returned to the agent (absent for system tools that end the call). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - public object? Response { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("mocked")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Mocked { 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. - /// - /// - /// Zero-based index of the conversation turn in which this call occurred. - /// - /// - /// - /// Arguments passed to the tool, as a JSON object. - /// - /// - /// - /// Response returned to the agent (absent for system tools that end the call). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSimulationToolCall( - int turnIndex, - string toolName, - object args, - bool mocked, - object? response) - { - this.TurnIndex = turnIndex; - this.ToolName = toolName ?? throw new global::System.ArgumentNullException(nameof(toolName)); - this.Args = args ?? throw new global::System.ArgumentNullException(nameof(args)); - this.Response = response; - this.Mocked = mocked; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSimulationToolCall() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallArgs.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallArgs.Json.g.cs deleted file mode 100644 index 41ce461..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallArgs.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSimulationToolCallArgs - { - /// - /// 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::Speechify.TtsSimulationToolCallArgs? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSimulationToolCallArgs), - jsonSerializerContext) as global::Speechify.TtsSimulationToolCallArgs; - } - - /// - /// 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::Speechify.TtsSimulationToolCallArgs? 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::Speechify.TtsSimulationToolCallArgs), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSimulationToolCallArgs; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSimulationToolCallArgs.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallArgs.g.cs deleted file mode 100644 index c5306d0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallArgs.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Arguments passed to the tool, as a JSON object. - /// - public sealed partial class TtsSimulationToolCallArgs - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallResponse.Json.g.cs deleted file mode 100644 index 6b444ce..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSimulationToolCallResponse - { - /// - /// 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::Speechify.TtsSimulationToolCallResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSimulationToolCallResponse), - jsonSerializerContext) as global::Speechify.TtsSimulationToolCallResponse; - } - - /// - /// 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::Speechify.TtsSimulationToolCallResponse? 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::Speechify.TtsSimulationToolCallResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSimulationToolCallResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSimulationToolCallResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallResponse.g.cs deleted file mode 100644 index 207c8a8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSimulationToolCallResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Response returned to the agent (absent for system tools that end the call). - /// - public sealed partial class TtsSimulationToolCallResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSpeechMarks.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSpeechMarks.g.cs index 6e93722..d0b1b9a 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSpeechMarks.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TtsSpeechMarks.g.cs @@ -101,5 +101,6 @@ public TtsSpeechMarks( public TtsSpeechMarks() { } + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfig.Json.g.cs deleted file mode 100644 index be1ae99..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSystemToolConfig - { - /// - /// 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::Speechify.TtsSystemToolConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSystemToolConfig), - jsonSerializerContext) as global::Speechify.TtsSystemToolConfig; - } - - /// - /// 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::Speechify.TtsSystemToolConfig? 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::Speechify.TtsSystemToolConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSystemToolConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSystemToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfig.g.cs deleted file mode 100644 index f465ac9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfig.g.cs +++ /dev/null @@ -1,65 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Config shape for `kind=system`. - /// - public sealed partial class TtsSystemToolConfig - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("builtin")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsSystemToolConfigBuiltinJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsSystemToolConfigBuiltin Builtin { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("params")] - public global::System.Collections.Generic.IList? Params { get; set; } - - /// - /// Per-builtin extras (e.g. allowed_numbers for transfer_to_number). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("builtin_config")] - public object? BuiltinConfig { 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. - /// - /// - /// - /// - /// Per-builtin extras (e.g. allowed_numbers for transfer_to_number). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSystemToolConfig( - global::Speechify.TtsSystemToolConfigBuiltin builtin, - global::System.Collections.Generic.IList? @params, - object? builtinConfig) - { - this.Builtin = builtin; - this.Params = @params; - this.BuiltinConfig = builtinConfig; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSystemToolConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltin.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltin.g.cs deleted file mode 100644 index 48a0882..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltin.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsSystemToolConfigBuiltin - { - /// - /// - /// - EndCall, - /// - /// - /// - PlayKeypadTouchTone, - /// - /// - /// - SkipTurn, - /// - /// - /// - TransferToAgent, - /// - /// - /// - TransferToNumber, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsSystemToolConfigBuiltinExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsSystemToolConfigBuiltin value) - { - return value switch - { - TtsSystemToolConfigBuiltin.EndCall => "end_call", - TtsSystemToolConfigBuiltin.PlayKeypadTouchTone => "play_keypad_touch_tone", - TtsSystemToolConfigBuiltin.SkipTurn => "skip_turn", - TtsSystemToolConfigBuiltin.TransferToAgent => "transfer_to_agent", - TtsSystemToolConfigBuiltin.TransferToNumber => "transfer_to_number", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsSystemToolConfigBuiltin? ToEnum(string value) - { - return value switch - { - "end_call" => TtsSystemToolConfigBuiltin.EndCall, - "play_keypad_touch_tone" => TtsSystemToolConfigBuiltin.PlayKeypadTouchTone, - "skip_turn" => TtsSystemToolConfigBuiltin.SkipTurn, - "transfer_to_agent" => TtsSystemToolConfigBuiltin.TransferToAgent, - "transfer_to_number" => TtsSystemToolConfigBuiltin.TransferToNumber, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig.Json.g.cs deleted file mode 100644 index f45f151..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSystemToolConfigBuiltinConfig - { - /// - /// 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::Speechify.TtsSystemToolConfigBuiltinConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSystemToolConfigBuiltinConfig), - jsonSerializerContext) as global::Speechify.TtsSystemToolConfigBuiltinConfig; - } - - /// - /// 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::Speechify.TtsSystemToolConfigBuiltinConfig? 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::Speechify.TtsSystemToolConfigBuiltinConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSystemToolConfigBuiltinConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig.g.cs deleted file mode 100644 index 3da90e4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Per-builtin extras (e.g. allowed_numbers for transfer_to_number). - /// - public sealed partial class TtsSystemToolConfigBuiltinConfig - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig2.Json.g.cs deleted file mode 100644 index b750b0a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSystemToolConfigBuiltinConfig2 - { - /// - /// 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::Speechify.TtsSystemToolConfigBuiltinConfig2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSystemToolConfigBuiltinConfig2), - jsonSerializerContext) as global::Speechify.TtsSystemToolConfigBuiltinConfig2; - } - - /// - /// 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::Speechify.TtsSystemToolConfigBuiltinConfig2? 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::Speechify.TtsSystemToolConfigBuiltinConfig2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSystemToolConfigBuiltinConfig2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig2.g.cs deleted file mode 100644 index 2bf9877..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemToolConfigBuiltinConfig2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsSystemToolConfigBuiltinConfig2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemVariableDoc.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemVariableDoc.Json.g.cs deleted file mode 100644 index 6539161..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemVariableDoc.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsSystemVariableDoc - { - /// - /// 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::Speechify.TtsSystemVariableDoc? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsSystemVariableDoc), - jsonSerializerContext) as global::Speechify.TtsSystemVariableDoc; - } - - /// - /// 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::Speechify.TtsSystemVariableDoc? 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::Speechify.TtsSystemVariableDoc), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsSystemVariableDoc; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsSystemVariableDoc.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsSystemVariableDoc.g.cs deleted file mode 100644 index cc4bb73..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsSystemVariableDoc.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Documents one reserved `system__*` variable that the platform
- /// auto-populates at session start. Customers cannot define or
- /// override these keys. - ///
- public sealed partial class TtsSystemVariableDoc - { - /// - /// The reserved variable key (always starts with `system__`). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("key")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Key { get; set; } - - /// - /// What the variable contains and when it is populated. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The reserved variable key (always starts with `system__`). - /// - /// - /// What the variable contains and when it is populated. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsSystemVariableDoc( - string key, - string description) - { - this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsSystemVariableDoc() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTenant.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTenant.Json.g.cs deleted file mode 100644 index 738e580..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTenant.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTenant - { - /// - /// 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::Speechify.TtsTenant? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTenant), - jsonSerializerContext) as global::Speechify.TtsTenant; - } - - /// - /// 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::Speechify.TtsTenant? 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::Speechify.TtsTenant), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTenant; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTenant.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTenant.g.cs deleted file mode 100644 index 63d8c78..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTenant.g.cs +++ /dev/null @@ -1,128 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A workspace the caller belongs to. - /// - public sealed partial class TtsTenant - { - /// - /// Opaque workspace ID. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// Display name set by the workspace owner. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// Billing plan tier. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("plan")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTenantPlanJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTenantPlan Plan { get; set; } - - /// - /// Geographic region the workspace's data is pinned to. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data_region")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTenantDataRegionJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTenantDataRegion DataRegion { get; set; } - - /// - /// When true, HIPAA-compliant retention and logging is enforced. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("hipaa_mode")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HipaaMode { get; set; } - - /// - /// When true, no transcript / audio payloads are retained server-side. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("zero_retention")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool ZeroRetention { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Opaque workspace ID. - /// - /// - /// Display name set by the workspace owner. - /// - /// - /// Billing plan tier. - /// - /// - /// Geographic region the workspace's data is pinned to. - /// - /// - /// When true, HIPAA-compliant retention and logging is enforced. - /// - /// - /// When true, no transcript / audio payloads are retained server-side. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTenant( - string id, - string name, - global::Speechify.TtsTenantPlan plan, - global::Speechify.TtsTenantDataRegion dataRegion, - bool hipaaMode, - bool zeroRetention, - global::System.DateTime createdAt, - global::System.DateTime updatedAt) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Plan = plan; - this.DataRegion = dataRegion; - this.HipaaMode = hipaaMode; - this.ZeroRetention = zeroRetention; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTenant() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantDataRegion.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTenantDataRegion.g.cs deleted file mode 100644 index 5552165..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantDataRegion.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Geographic region the workspace's data is pinned to. - /// - public enum TtsTenantDataRegion - { - /// - /// - /// - Eu, - /// - /// - /// - In, - /// - /// - /// - Us, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsTenantDataRegionExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsTenantDataRegion value) - { - return value switch - { - TtsTenantDataRegion.Eu => "eu", - TtsTenantDataRegion.In => "in", - TtsTenantDataRegion.Us => "us", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsTenantDataRegion? ToEnum(string value) - { - return value switch - { - "eu" => TtsTenantDataRegion.Eu, - "in" => TtsTenantDataRegion.In, - "us" => TtsTenantDataRegion.Us, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantPlan.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTenantPlan.g.cs deleted file mode 100644 index 0113275..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantPlan.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Billing plan tier. - /// - public enum TtsTenantPlan - { - /// - /// - /// - Business, - /// - /// - /// - Enterprise, - /// - /// - /// - Free, - /// - /// - /// - Pro, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsTenantPlanExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsTenantPlan value) - { - return value switch - { - TtsTenantPlan.Business => "business", - TtsTenantPlan.Enterprise => "enterprise", - TtsTenantPlan.Free => "free", - TtsTenantPlan.Pro => "pro", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsTenantPlan? ToEnum(string value) - { - return value switch - { - "business" => TtsTenantPlan.Business, - "enterprise" => TtsTenantPlan.Enterprise, - "free" => TtsTenantPlan.Free, - "pro" => TtsTenantPlan.Pro, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantsListResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTenantsListResponse.Json.g.cs deleted file mode 100644 index 3921e62..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantsListResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTenantsListResponse - { - /// - /// 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::Speechify.TtsTenantsListResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTenantsListResponse), - jsonSerializerContext) as global::Speechify.TtsTenantsListResponse; - } - - /// - /// 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::Speechify.TtsTenantsListResponse? 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::Speechify.TtsTenantsListResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTenantsListResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTenantsListResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTenantsListResponse.g.cs deleted file mode 100644 index 5a9b4e8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTenantsListResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsTenantsListResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tenants")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tenants { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTenantsListResponse( - global::System.Collections.Generic.IList tenants) - { - this.Tenants = tenants ?? throw new global::System.ArgumentNullException(nameof(tenants)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTenantsListResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunResult.Json.g.cs deleted file mode 100644 index 6006472..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTestRunResult - { - /// - /// 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::Speechify.TtsTestRunResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTestRunResult), - jsonSerializerContext) as global::Speechify.TtsTestRunResult; - } - - /// - /// 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::Speechify.TtsTestRunResult? 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::Speechify.TtsTestRunResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTestRunResult; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTestRunResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunResult.g.cs deleted file mode 100644 index ddec855..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunResult.g.cs +++ /dev/null @@ -1,117 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Union-like result of a completed test run. Exactly one of
- /// `scenario`, `tool_call`, or `simulation` is populated, matching
- /// the `test_type`. - ///
- public sealed partial class TtsTestRunResult - { - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("test_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsTestTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsTestType TestType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Passed { get; set; } - - /// - /// Top-level verdict explanation duplicated from the inner result for quick rendering. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rationale")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Rationale { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long DurationMs { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("scenario")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OneOfJsonConverter))] - public global::Speechify.OneOf? Scenario { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_call")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OneOfJsonConverter))] - public global::Speechify.OneOf? ToolCall { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("simulation")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OneOfJsonConverter))] - public global::Speechify.OneOf? Simulation { 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. - /// - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - /// - /// - /// - /// Top-level verdict explanation duplicated from the inner result for quick rendering. - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTestRunResult( - global::Speechify.TtsTestType testType, - bool passed, - string rationale, - long durationMs, - global::Speechify.OneOf? scenario, - global::Speechify.OneOf? toolCall, - global::Speechify.OneOf? simulation) - { - this.TestType = testType; - this.Passed = passed; - this.Rationale = rationale ?? throw new global::System.ArgumentNullException(nameof(rationale)); - this.DurationMs = durationMs; - this.Scenario = scenario; - this.ToolCall = toolCall; - this.Simulation = simulation; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTestRunResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunStatus.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunStatus.g.cs deleted file mode 100644 index 8ff550d..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestRunStatus.g.cs +++ /dev/null @@ -1,74 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Lifecycle of a test run: `queued` - `running` - terminal.
- /// Terminal states:
- /// - `passed` - the agent behaviour met the success criteria.
- /// - `failed` - the agent behaviour did not meet the success criteria.
- /// - `error` - the runner itself could not complete (LLM outage, network error, etc.),
- /// distinct from `failed` which means the agent behaviour was judged and found lacking. - ///
- public enum TtsTestRunStatus - { - /// - /// - /// - Error, - /// - /// - /// - Failed, - /// - /// - /// - Passed, - /// - /// `queued` - `running` - terminal. - /// - Queued, - /// - /// `queued` - `running` - terminal. - /// - Running, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsTestRunStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsTestRunStatus value) - { - return value switch - { - TtsTestRunStatus.Error => "error", - TtsTestRunStatus.Failed => "failed", - TtsTestRunStatus.Passed => "passed", - TtsTestRunStatus.Queued => "queued", - TtsTestRunStatus.Running => "running", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsTestRunStatus? ToEnum(string value) - { - return value switch - { - "error" => TtsTestRunStatus.Error, - "failed" => TtsTestRunStatus.Failed, - "passed" => TtsTestRunStatus.Passed, - "queued" => TtsTestRunStatus.Queued, - "running" => TtsTestRunStatus.Running, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStats.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestStats.Json.g.cs deleted file mode 100644 index f464f2c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStats.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTestStats - { - /// - /// 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::Speechify.TtsTestStats? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTestStats), - jsonSerializerContext) as global::Speechify.TtsTestStats; - } - - /// - /// 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::Speechify.TtsTestStats? 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::Speechify.TtsTestStats), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTestStats; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTestStats.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestStats.g.cs deleted file mode 100644 index 7c1c916..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStats.g.cs +++ /dev/null @@ -1,116 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Aggregate run metrics over the requested window. `buckets` is
- /// dense - one entry per day in the window, zero-filled, so a chart
- /// never has gaps. `by_type` counts runs per test type across the
- /// whole window. - ///
- public sealed partial class TtsTestStats - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("window_days")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int WindowDays { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("buckets")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Buckets { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("total_runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int TotalRuns { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed_runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int PassedRuns { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("failed_runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int FailedRuns { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("errored_runs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int ErroredRuns { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("avg_duration_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int AvgDurationMs { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("by_type")] - public global::System.Collections.Generic.Dictionary? ByType { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTestStats( - int windowDays, - global::System.Collections.Generic.IList buckets, - int totalRuns, - int passedRuns, - int failedRuns, - int erroredRuns, - int avgDurationMs, - global::System.Collections.Generic.Dictionary? byType) - { - this.WindowDays = windowDays; - this.Buckets = buckets ?? throw new global::System.ArgumentNullException(nameof(buckets)); - this.TotalRuns = totalRuns; - this.PassedRuns = passedRuns; - this.FailedRuns = failedRuns; - this.ErroredRuns = erroredRuns; - this.AvgDurationMs = avgDurationMs; - this.ByType = byType; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTestStats() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsBucket.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsBucket.Json.g.cs deleted file mode 100644 index e74d6fb..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsBucket.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTestStatsBucket - { - /// - /// 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::Speechify.TtsTestStatsBucket? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTestStatsBucket), - jsonSerializerContext) as global::Speechify.TtsTestStatsBucket; - } - - /// - /// 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::Speechify.TtsTestStatsBucket? 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::Speechify.TtsTestStatsBucket), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTestStatsBucket; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTestStatsBucket.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsBucket.g.cs deleted file mode 100644 index 33603cf..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsBucket.g.cs +++ /dev/null @@ -1,76 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One daily point on the aggregate pass-rate chart. - /// - public sealed partial class TtsTestStatsBucket - { - /// - /// ISO date (YYYY-MM-DD). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("day")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Day { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Passed { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("failed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Failed { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("errored")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Errored { 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. - /// - /// - /// ISO date (YYYY-MM-DD). - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTestStatsBucket( - string day, - int passed, - int failed, - int errored) - { - this.Day = day ?? throw new global::System.ArgumentNullException(nameof(day)); - this.Passed = passed; - this.Failed = failed; - this.Errored = errored; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTestStatsBucket() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsByType.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsByType.Json.g.cs deleted file mode 100644 index 06527c0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsByType.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTestStatsByType - { - /// - /// 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::Speechify.TtsTestStatsByType? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTestStatsByType), - jsonSerializerContext) as global::Speechify.TtsTestStatsByType; - } - - /// - /// 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::Speechify.TtsTestStatsByType? 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::Speechify.TtsTestStatsByType), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTestStatsByType; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTestStatsByType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsByType.g.cs deleted file mode 100644 index 650828b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestStatsByType.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsTestStatsByType - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTestType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTestType.g.cs deleted file mode 100644 index df71fd1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTestType.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - ///
- public enum TtsTestType - { - /// - /// - /// - Scenario, - /// - /// - /// - Simulation, - /// - /// - /// - Tool, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsTestTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsTestType value) - { - return value switch - { - TtsTestType.Scenario => "scenario", - TtsTestType.Simulation => "simulation", - TtsTestType.Tool => "tool", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsTestType? ToEnum(string value) - { - return value switch - { - "scenario" => TtsTestType.Scenario, - "simulation" => TtsTestType.Simulation, - "tool" => TtsTestType.Tool, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTool.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTool.Json.g.cs deleted file mode 100644 index bb4f603..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTool.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTool - { - /// - /// 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::Speechify.TtsTool? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTool), - jsonSerializerContext) as global::Speechify.TtsTool; - } - - /// - /// 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::Speechify.TtsTool? 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::Speechify.TtsTool), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTool; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTool.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTool.g.cs deleted file mode 100644 index d107de1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTool.g.cs +++ /dev/null @@ -1,131 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsTool - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("kind")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsToolKindJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsToolKind Kind { get; set; } - - /// - /// One of `SystemToolConfig`, `WebhookToolConfig`, or `ClientToolConfig` depending on `kind`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsToolConfigJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsToolConfig Config { get; set; } - - /// - /// HMAC signing secret for `kind=webhook`. Returned in full **only** on the create
- /// response; all subsequent reads return a masked placeholder. Store it on first
- /// create — there is no way to retrieve it later. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("webhook_secret")] - public string? WebhookSecret { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime UpdatedAt { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - /// - /// - /// One of `SystemToolConfig`, `WebhookToolConfig`, or `ClientToolConfig` depending on `kind`. - /// - /// - /// - /// - /// HMAC signing secret for `kind=webhook`. Returned in full **only** on the create
- /// response; all subsequent reads return a masked placeholder. Store it on first
- /// create — there is no way to retrieve it later. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTool( - string id, - string name, - string description, - global::Speechify.TtsToolKind kind, - global::Speechify.TtsToolConfig config, - global::System.DateTime createdAt, - global::System.DateTime updatedAt, - string? webhookSecret) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Kind = kind; - this.Config = config; - this.WebhookSecret = webhookSecret; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTool() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallConfig.Json.g.cs deleted file mode 100644 index 7b867f9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolCallConfig - { - /// - /// 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::Speechify.TtsToolCallConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolCallConfig), - jsonSerializerContext) as global::Speechify.TtsToolCallConfig; - } - - /// - /// 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::Speechify.TtsToolCallConfig? 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::Speechify.TtsToolCallConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolCallConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolCallConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallConfig.g.cs deleted file mode 100644 index 4ac8413..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallConfig.g.cs +++ /dev/null @@ -1,105 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Configuration for a `tool` test. The runner sends `context` as a
- /// user message and asserts that the agent calls `expected_tool` with
- /// arguments matching all `parameter_checks`. Use
- /// `initial_chat_history` to test tool invocations that only make
- /// sense mid-conversation. - ///
- public sealed partial class TtsToolCallConfig - { - /// - /// User message that should cause the agent to invoke the expected tool. Optional when `initial_chat_history` already ends with a user message. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("context")] - public string? Context { get; set; } - - /// - /// Name of the tool the agent is expected to call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expected_tool")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ExpectedTool { get; set; } - - /// - /// Assertions on specific arguments of the tool call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parameter_checks")] - public global::System.Collections.Generic.IList? ParameterChecks { get; set; } - - /// - /// Optional seed conversation prepended before `context`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("initial_chat_history")] - public global::System.Collections.Generic.IList? InitialChatHistory { get; set; } - - /// - /// Replaces the agent's system prompt for this run only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("system_prompt_override")] - public string? SystemPromptOverride { get; set; } - - /// - /// Overrides the LLM model used by the agent for this run only. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_override")] - public string? ModelOverride { 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. - /// - /// - /// Name of the tool the agent is expected to call. - /// - /// - /// User message that should cause the agent to invoke the expected tool. Optional when `initial_chat_history` already ends with a user message. - /// - /// - /// Assertions on specific arguments of the tool call. - /// - /// - /// Optional seed conversation prepended before `context`. - /// - /// - /// Replaces the agent's system prompt for this run only. - /// - /// - /// Overrides the LLM model used by the agent for this run only. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsToolCallConfig( - string expectedTool, - string? context, - global::System.Collections.Generic.IList? parameterChecks, - global::System.Collections.Generic.IList? initialChatHistory, - string? systemPromptOverride, - string? modelOverride) - { - this.Context = context; - this.ExpectedTool = expectedTool ?? throw new global::System.ArgumentNullException(nameof(expectedTool)); - this.ParameterChecks = parameterChecks; - this.InitialChatHistory = initialChatHistory; - this.SystemPromptOverride = systemPromptOverride; - this.ModelOverride = modelOverride; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsToolCallConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResult.Json.g.cs deleted file mode 100644 index 67583f2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolCallResult - { - /// - /// 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::Speechify.TtsToolCallResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolCallResult), - jsonSerializerContext) as global::Speechify.TtsToolCallResult; - } - - /// - /// 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::Speechify.TtsToolCallResult? 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::Speechify.TtsToolCallResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolCallResult; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolCallResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResult.g.cs deleted file mode 100644 index f077d6a..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResult.g.cs +++ /dev/null @@ -1,123 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Result details for a `tool` test run. - /// - public sealed partial class TtsToolCallResult - { - /// - /// Name of the tool the agent actually called (may differ from `expected_tool`). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_called")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ToolCalled { get; set; } - - /// - /// Arguments the agent passed to the tool, as a JSON object. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_args")] - public object? ToolArgs { get; set; } - - /// - /// Name of the tool the test expected the agent to call. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("expected_tool")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ExpectedTool { get; set; } - - /// - /// True when `tool_called` equals `expected_tool`. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_matched")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool ToolMatched { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parameter_results")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList ParameterResults { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("passed")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Passed { get; set; } - - /// - /// Explanation of the overall verdict. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("rationale")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Rationale { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("duration_ms")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long DurationMs { 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. - /// - /// - /// Name of the tool the agent actually called (may differ from `expected_tool`). - /// - /// - /// Name of the tool the test expected the agent to call. - /// - /// - /// True when `tool_called` equals `expected_tool`. - /// - /// - /// - /// - /// Explanation of the overall verdict. - /// - /// - /// - /// Arguments the agent passed to the tool, as a JSON object. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsToolCallResult( - string toolCalled, - string expectedTool, - bool toolMatched, - global::System.Collections.Generic.IList parameterResults, - bool passed, - string rationale, - long durationMs, - object? toolArgs) - { - this.ToolCalled = toolCalled ?? throw new global::System.ArgumentNullException(nameof(toolCalled)); - this.ToolArgs = toolArgs; - this.ExpectedTool = expectedTool ?? throw new global::System.ArgumentNullException(nameof(expectedTool)); - this.ToolMatched = toolMatched; - this.ParameterResults = parameterResults ?? throw new global::System.ArgumentNullException(nameof(parameterResults)); - this.Passed = passed; - this.Rationale = rationale ?? throw new global::System.ArgumentNullException(nameof(rationale)); - this.DurationMs = durationMs; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsToolCallResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResultToolArgs.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResultToolArgs.Json.g.cs deleted file mode 100644 index fe04436..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResultToolArgs.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolCallResultToolArgs - { - /// - /// 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::Speechify.TtsToolCallResultToolArgs? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolCallResultToolArgs), - jsonSerializerContext) as global::Speechify.TtsToolCallResultToolArgs; - } - - /// - /// 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::Speechify.TtsToolCallResultToolArgs? 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::Speechify.TtsToolCallResultToolArgs), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolCallResultToolArgs; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolCallResultToolArgs.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResultToolArgs.g.cs deleted file mode 100644 index e3e43b8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolCallResultToolArgs.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Arguments the agent passed to the tool, as a JSON object. - /// - public sealed partial class TtsToolCallResultToolArgs - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolConfig.Json.g.cs deleted file mode 100644 index 33bede8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct TtsToolConfig - { - /// - /// 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::Speechify.TtsToolConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolConfig), - jsonSerializerContext) as global::Speechify.TtsToolConfig?; - } - - /// - /// 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::Speechify.TtsToolConfig? 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::Speechify.TtsToolConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolConfig?; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolConfig.g.cs deleted file mode 100644 index aba88b9..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolConfig.g.cs +++ /dev/null @@ -1,273 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Speechify -{ - /// - /// One of `SystemToolConfig`, `WebhookToolConfig`, or `ClientToolConfig` depending on `kind`. - /// - public readonly partial struct TtsToolConfig : global::System.IEquatable - { - /// - /// Config shape for `kind=system`. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsSystemToolConfig? SystemToolConfig { get; init; } -#else - public global::Speechify.TtsSystemToolConfig? SystemToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemToolConfig))] -#endif - public bool IsSystemToolConfig => SystemToolConfig != null; - - /// - /// Config shape for `kind=webhook`. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsWebhookToolConfig? WebhookToolConfig { get; init; } -#else - public global::Speechify.TtsWebhookToolConfig? WebhookToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebhookToolConfig))] -#endif - public bool IsWebhookToolConfig => WebhookToolConfig != null; - - /// - /// Config shape for `kind=client`. Execution happens in the caller's browser / SDK. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsClientToolConfig? ClientToolConfig { get; init; } -#else - public global::Speechify.TtsClientToolConfig? ClientToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientToolConfig))] -#endif - public bool IsClientToolConfig => ClientToolConfig != null; - /// - /// - /// - public static implicit operator TtsToolConfig(global::Speechify.TtsSystemToolConfig value) => new TtsToolConfig((global::Speechify.TtsSystemToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsSystemToolConfig?(TtsToolConfig @this) => @this.SystemToolConfig; - - /// - /// - /// - public TtsToolConfig(global::Speechify.TtsSystemToolConfig? value) - { - SystemToolConfig = value; - } - - /// - /// - /// - public static implicit operator TtsToolConfig(global::Speechify.TtsWebhookToolConfig value) => new TtsToolConfig((global::Speechify.TtsWebhookToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsWebhookToolConfig?(TtsToolConfig @this) => @this.WebhookToolConfig; - - /// - /// - /// - public TtsToolConfig(global::Speechify.TtsWebhookToolConfig? value) - { - WebhookToolConfig = value; - } - - /// - /// - /// - public static implicit operator TtsToolConfig(global::Speechify.TtsClientToolConfig value) => new TtsToolConfig((global::Speechify.TtsClientToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsClientToolConfig?(TtsToolConfig @this) => @this.ClientToolConfig; - - /// - /// - /// - public TtsToolConfig(global::Speechify.TtsClientToolConfig? value) - { - ClientToolConfig = value; - } - - /// - /// - /// - public TtsToolConfig( - global::Speechify.TtsSystemToolConfig? systemToolConfig, - global::Speechify.TtsWebhookToolConfig? webhookToolConfig, - global::Speechify.TtsClientToolConfig? clientToolConfig - ) - { - SystemToolConfig = systemToolConfig; - WebhookToolConfig = webhookToolConfig; - ClientToolConfig = clientToolConfig; - } - - /// - /// - /// - public object? Object => - ClientToolConfig as object ?? - WebhookToolConfig as object ?? - SystemToolConfig as object - ; - - /// - /// - /// - public override string? ToString() => - SystemToolConfig?.ToString() ?? - WebhookToolConfig?.ToString() ?? - ClientToolConfig?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsSystemToolConfig && !IsWebhookToolConfig && !IsClientToolConfig || !IsSystemToolConfig && IsWebhookToolConfig && !IsClientToolConfig || !IsSystemToolConfig && !IsWebhookToolConfig && IsClientToolConfig; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? systemToolConfig = null, - global::System.Func? webhookToolConfig = null, - global::System.Func? clientToolConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsSystemToolConfig && systemToolConfig != null) - { - return systemToolConfig(SystemToolConfig!); - } - else if (IsWebhookToolConfig && webhookToolConfig != null) - { - return webhookToolConfig(WebhookToolConfig!); - } - else if (IsClientToolConfig && clientToolConfig != null) - { - return clientToolConfig(ClientToolConfig!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? systemToolConfig = null, - global::System.Action? webhookToolConfig = null, - global::System.Action? clientToolConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsSystemToolConfig) - { - systemToolConfig?.Invoke(SystemToolConfig!); - } - else if (IsWebhookToolConfig) - { - webhookToolConfig?.Invoke(WebhookToolConfig!); - } - else if (IsClientToolConfig) - { - clientToolConfig?.Invoke(ClientToolConfig!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - SystemToolConfig, - typeof(global::Speechify.TtsSystemToolConfig), - WebhookToolConfig, - typeof(global::Speechify.TtsWebhookToolConfig), - ClientToolConfig, - typeof(global::Speechify.TtsClientToolConfig), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TtsToolConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemToolConfig, other.SystemToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) - ; - } - - /// - /// - /// - public static bool operator ==(TtsToolConfig obj1, TtsToolConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TtsToolConfig obj1, TtsToolConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TtsToolConfig o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolKind.g.cs deleted file mode 100644 index 8831fcf..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolKind.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - ///
- public enum TtsToolKind - { - /// - /// worker dispatches to the caller's browser/SDK via data channel - /// - Client, - /// - /// worker-resident built-in (e.g. end_call, transfer_to_number) - /// - System, - /// - /// worker signs a payload and POSTs it to your URL - /// - Webhook, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsToolKindExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsToolKind value) - { - return value switch - { - TtsToolKind.Client => "client", - TtsToolKind.System => "system", - TtsToolKind.Webhook => "webhook", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsToolKind? ToEnum(string value) - { - return value switch - { - "client" => TtsToolKind.Client, - "system" => TtsToolKind.System, - "webhook" => TtsToolKind.Webhook, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMock.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolMock.Json.g.cs deleted file mode 100644 index 5ec16dc..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMock.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolMock - { - /// - /// 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::Speechify.TtsToolMock? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolMock), - jsonSerializerContext) as global::Speechify.TtsToolMock; - } - - /// - /// 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::Speechify.TtsToolMock? 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::Speechify.TtsToolMock), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolMock; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolMock.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolMock.g.cs deleted file mode 100644 index 2c1d0da..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMock.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// A canned response returned when the agent calls `tool_name`. If
- /// `args_match` is set the mock only triggers when its value appears
- /// as a substring of the JSON-serialised call arguments (a deliberately
- /// simple v1 matcher — full expression support is planned). A mock
- /// without `args_match` always matches for its tool. - ///
- public sealed partial class TtsToolMock - { - /// - /// Name of the tool to intercept. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ToolName { get; set; } - - /// - /// Optional substring of the JSON-serialised call arguments. When
- /// absent the mock matches unconditionally for this tool. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("args_match")] - public string? ArgsMatch { get; set; } - - /// - /// JSON value returned to the agent as the tool result. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response")] - [global::System.Text.Json.Serialization.JsonRequired] - public required object Response { 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. - /// - /// - /// Name of the tool to intercept. - /// - /// - /// JSON value returned to the agent as the tool result. - /// - /// - /// Optional substring of the JSON-serialised call arguments. When
- /// absent the mock matches unconditionally for this tool. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsToolMock( - string toolName, - object response, - string? argsMatch) - { - this.ToolName = toolName ?? throw new global::System.ArgumentNullException(nameof(toolName)); - this.ArgsMatch = argsMatch; - this.Response = response ?? throw new global::System.ArgumentNullException(nameof(response)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsToolMock() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockConfig.Json.g.cs deleted file mode 100644 index 6b1b952..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolMockConfig - { - /// - /// 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::Speechify.TtsToolMockConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolMockConfig), - jsonSerializerContext) as global::Speechify.TtsToolMockConfig; - } - - /// - /// 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::Speechify.TtsToolMockConfig? 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::Speechify.TtsToolMockConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolMockConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolMockConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockConfig.g.cs deleted file mode 100644 index 2245b64..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockConfig.g.cs +++ /dev/null @@ -1,103 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Controls tool-call interception during a test run. - /// - public sealed partial class TtsToolMockConfig - { - /// - /// Controls which tool calls the runner intercepts during a run.
- /// System tools (`end_call`, `transfer_to_number`, etc.) are never
- /// mocked regardless of strategy.
- /// - `none` - no interception; all tools are called normally.
- /// - `all` - every non-system tool call is intercepted and matched
- /// against the `mocks` list.
- /// - `selected` - only tools explicitly listed in `mocks` are
- /// intercepted; others are called normally. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsMockingStrategyJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsMockingStrategy Strategy { get; set; } - - /// - /// Canned responses for specific tools (order matters - first match wins). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("mocks")] - public global::System.Collections.Generic.IList? Mocks { get; set; } - - /// - /// Fallback when a mockable tool is called but no configured mock
- /// matches the call arguments.
- /// - `call_real_tool` - pass-through: actually invoke the underlying tool.
- /// - `finish_with_error` - fail: short-circuit the run to an `error`
- /// status. Useful when a test wants to assert that a specific mocked
- /// response path is taken - any unmocked tool call aborts the run.
- /// - `skip` - return an empty stub (`{"skipped":true}`) to the agent so
- /// the simulation proceeds without treating the call as a failure.
- /// Useful when a tool's output is irrelevant to the behaviour under
- /// test but the model may still decide to call it. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("no_match_behavior")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsNoMatchBehaviorJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsNoMatchBehavior NoMatchBehavior { 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. - /// - /// - /// Controls which tool calls the runner intercepts during a run.
- /// System tools (`end_call`, `transfer_to_number`, etc.) are never
- /// mocked regardless of strategy.
- /// - `none` - no interception; all tools are called normally.
- /// - `all` - every non-system tool call is intercepted and matched
- /// against the `mocks` list.
- /// - `selected` - only tools explicitly listed in `mocks` are
- /// intercepted; others are called normally. - /// - /// - /// Fallback when a mockable tool is called but no configured mock
- /// matches the call arguments.
- /// - `call_real_tool` - pass-through: actually invoke the underlying tool.
- /// - `finish_with_error` - fail: short-circuit the run to an `error`
- /// status. Useful when a test wants to assert that a specific mocked
- /// response path is taken - any unmocked tool call aborts the run.
- /// - `skip` - return an empty stub (`{"skipped":true}`) to the agent so
- /// the simulation proceeds without treating the call as a failure.
- /// Useful when a tool's output is irrelevant to the behaviour under
- /// test but the model may still decide to call it. - /// - /// - /// Canned responses for specific tools (order matters - first match wins). - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsToolMockConfig( - global::Speechify.TtsMockingStrategy strategy, - global::Speechify.TtsNoMatchBehavior noMatchBehavior, - global::System.Collections.Generic.IList? mocks) - { - this.Strategy = strategy; - this.Mocks = mocks; - this.NoMatchBehavior = noMatchBehavior; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsToolMockConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockResponse.Json.g.cs deleted file mode 100644 index 0c847ae..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolMockResponse - { - /// - /// 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::Speechify.TtsToolMockResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolMockResponse), - jsonSerializerContext) as global::Speechify.TtsToolMockResponse; - } - - /// - /// 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::Speechify.TtsToolMockResponse? 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::Speechify.TtsToolMockResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolMockResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolMockResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockResponse.g.cs deleted file mode 100644 index dc026e7..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolMockResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// JSON value returned to the agent as the tool result. - /// - public sealed partial class TtsToolMockResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolParam.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolParam.Json.g.cs deleted file mode 100644 index be7dc59..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolParam.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsToolParam - { - /// - /// 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::Speechify.TtsToolParam? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsToolParam), - jsonSerializerContext) as global::Speechify.TtsToolParam; - } - - /// - /// 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::Speechify.TtsToolParam? 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::Speechify.TtsToolParam), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsToolParam; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsToolParam.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolParam.g.cs deleted file mode 100644 index bf1d3ab..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolParam.g.cs +++ /dev/null @@ -1,84 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// One argument the LLM can pass when calling the tool. Mirrors the JSON-Schema subset standard function-calling schemas support. - /// - public sealed partial class TtsToolParam - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsToolParamTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsToolParamType Type { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("required")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool Required { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("enum")] - public global::System.Collections.Generic.IList? Enum { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsToolParam( - string name, - global::Speechify.TtsToolParamType type, - string description, - bool required, - global::System.Collections.Generic.IList? @enum) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Type = type; - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - this.Required = required; - this.Enum = @enum; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsToolParam() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsToolParamType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsToolParamType.g.cs deleted file mode 100644 index d3757aa..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsToolParamType.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public enum TtsToolParamType - { - /// - /// - /// - Boolean, - /// - /// - /// - Integer, - /// - /// - /// - Number, - /// - /// - /// - String, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsToolParamTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsToolParamType value) - { - return value switch - { - TtsToolParamType.Boolean => "boolean", - TtsToolParamType.Integer => "integer", - TtsToolParamType.Number => "number", - TtsToolParamType.String => "string", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsToolParamType? ToEnum(string value) - { - return value switch - { - "boolean" => TtsToolParamType.Boolean, - "integer" => TtsToolParamType.Integer, - "number" => TtsToolParamType.Number, - "string" => TtsToolParamType.String, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsTransferOwnershipRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTransferOwnershipRequest.Json.g.cs deleted file mode 100644 index eeff0fd..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTransferOwnershipRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsTransferOwnershipRequest - { - /// - /// 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::Speechify.TtsTransferOwnershipRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsTransferOwnershipRequest), - jsonSerializerContext) as global::Speechify.TtsTransferOwnershipRequest; - } - - /// - /// 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::Speechify.TtsTransferOwnershipRequest? 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::Speechify.TtsTransferOwnershipRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsTransferOwnershipRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsTransferOwnershipRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsTransferOwnershipRequest.g.cs deleted file mode 100644 index da42db4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsTransferOwnershipRequest.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Body for POST /v1/tenants/current/transfer-owner. The target
- /// must already be a member of the current workspace — promote via
- /// invite + accept first for external users. - ///
- public sealed partial class TtsTransferOwnershipRequest - { - /// - /// Firebase UID of the member who will become the new owner. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_uid")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string UserUid { 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. - /// - /// - /// Firebase UID of the member who will become the new owner. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsTransferOwnershipRequest( - string userUid) - { - this.UserUid = userUid ?? throw new global::System.ArgumentNullException(nameof(userUid)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsTransferOwnershipRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequest.Json.g.cs deleted file mode 100644 index 4817358..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateAgentRequest - { - /// - /// 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::Speechify.TtsUpdateAgentRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateAgentRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateAgentRequest; - } - - /// - /// 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::Speechify.TtsUpdateAgentRequest? 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::Speechify.TtsUpdateAgentRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateAgentRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequest.g.cs deleted file mode 100644 index 99fc3ed..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequest.g.cs +++ /dev/null @@ -1,157 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsUpdateAgentRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - public string? Prompt { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("first_message")] - public string? FirstMessage { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("language")] - public string? Language { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("llm_model")] - public string? LlmModel { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] - public string? VoiceId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - public object? Config { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("is_public")] - public bool? IsPublic { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("allowed_origins")] - public global::System.Collections.Generic.IList? AllowedOrigins { get; set; } - - /// - /// When supplied, replaces the stored list. Pass an empty
- /// array to clear enforcement (public agent is open again).
- /// Omit the field to leave the existing value unchanged. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("hostname_allowlist")] - public global::System.Collections.Generic.IList? HostnameAllowlist { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("memory_enabled")] - public bool? MemoryEnabled { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("memory_retention_days")] - public int? MemoryRetentionDays { 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. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// When supplied, replaces the stored list. Pass an empty
- /// array to clear enforcement (public agent is open again).
- /// Omit the field to leave the existing value unchanged. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateAgentRequest( - string? name, - string? prompt, - string? firstMessage, - string? language, - string? llmModel, - string? voiceId, - double? temperature, - object? config, - bool? isPublic, - global::System.Collections.Generic.IList? allowedOrigins, - global::System.Collections.Generic.IList? hostnameAllowlist, - bool? memoryEnabled, - int? memoryRetentionDays) - { - this.Name = name; - this.Prompt = prompt; - this.FirstMessage = firstMessage; - this.Language = language; - this.LlmModel = llmModel; - this.VoiceId = voiceId; - this.Temperature = temperature; - this.Config = config; - this.IsPublic = isPublic; - this.AllowedOrigins = allowedOrigins; - this.HostnameAllowlist = hostnameAllowlist; - this.MemoryEnabled = memoryEnabled; - this.MemoryRetentionDays = memoryRetentionDays; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateAgentRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig.Json.g.cs deleted file mode 100644 index 4fb554c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateAgentRequestConfig - { - /// - /// 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::Speechify.TtsUpdateAgentRequestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateAgentRequestConfig), - jsonSerializerContext) as global::Speechify.TtsUpdateAgentRequestConfig; - } - - /// - /// 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::Speechify.TtsUpdateAgentRequestConfig? 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::Speechify.TtsUpdateAgentRequestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateAgentRequestConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig.g.cs deleted file mode 100644 index fb556de..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsUpdateAgentRequestConfig - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig2.Json.g.cs deleted file mode 100644 index d2c0aa8..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateAgentRequestConfig2 - { - /// - /// 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::Speechify.TtsUpdateAgentRequestConfig2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateAgentRequestConfig2), - jsonSerializerContext) as global::Speechify.TtsUpdateAgentRequestConfig2; - } - - /// - /// 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::Speechify.TtsUpdateAgentRequestConfig2? 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::Speechify.TtsUpdateAgentRequestConfig2), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateAgentRequestConfig2; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig2.g.cs deleted file mode 100644 index db259b3..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentRequestConfig2.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class TtsUpdateAgentRequestConfig2 - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestFolderRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestFolderRequest.Json.g.cs deleted file mode 100644 index 37eeba5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestFolderRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateAgentTestFolderRequest - { - /// - /// 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::Speechify.TtsUpdateAgentTestFolderRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateAgentTestFolderRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateAgentTestFolderRequest; - } - - /// - /// 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::Speechify.TtsUpdateAgentTestFolderRequest? 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::Speechify.TtsUpdateAgentTestFolderRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateAgentTestFolderRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestFolderRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestFolderRequest.g.cs deleted file mode 100644 index 1110fa0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestFolderRequest.g.cs +++ /dev/null @@ -1,53 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// PATCH body. Both fields optional; omit to leave unchanged.
- /// Pass `parent_folder_id: null` to reparent to root. - ///
- public sealed partial class TtsUpdateAgentTestFolderRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("parent_folder_id")] - public string? ParentFolderId { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateAgentTestFolderRequest( - string? name, - string? parentFolderId) - { - this.Name = name; - this.ParentFolderId = parentFolderId; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateAgentTestFolderRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequest.Json.g.cs deleted file mode 100644 index 271c8e3..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateAgentTestRequest - { - /// - /// 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::Speechify.TtsUpdateAgentTestRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateAgentTestRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateAgentTestRequest; - } - - /// - /// 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::Speechify.TtsUpdateAgentTestRequest? 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::Speechify.TtsUpdateAgentTestRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateAgentTestRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequest.g.cs deleted file mode 100644 index 05ab4eb..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequest.g.cs +++ /dev/null @@ -1,76 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Payload for `PATCH /v1/tests/{id}`. All fields are optional;
- /// omitting a field leaves it unchanged. - ///
- public sealed partial class TtsUpdateAgentTestRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// Replaces the test config when present. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsUpdateAgentTestRequestConfigJsonConverter))] - public global::Speechify.TtsUpdateAgentTestRequestConfig? Config { get; set; } - - /// - /// Replaces the tool-mock config when present. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_mock_config")] - public global::Speechify.TtsToolMockConfig? ToolMockConfig { 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. - /// - /// - /// - /// - /// Replaces the test config when present. - /// - /// - /// Replaces the tool-mock config when present. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateAgentTestRequest( - string? name, - string? description, - global::Speechify.TtsUpdateAgentTestRequestConfig? config, - global::Speechify.TtsToolMockConfig? toolMockConfig) - { - this.Name = name; - this.Description = description; - this.Config = config; - this.ToolMockConfig = toolMockConfig; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateAgentTestRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequestConfig.Json.g.cs deleted file mode 100644 index d947e5c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct TtsUpdateAgentTestRequestConfig - { - /// - /// 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::Speechify.TtsUpdateAgentTestRequestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateAgentTestRequestConfig), - jsonSerializerContext) as global::Speechify.TtsUpdateAgentTestRequestConfig?; - } - - /// - /// 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::Speechify.TtsUpdateAgentTestRequestConfig? 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::Speechify.TtsUpdateAgentTestRequestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateAgentTestRequestConfig?; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequestConfig.g.cs deleted file mode 100644 index 67c0517..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateAgentTestRequestConfig.g.cs +++ /dev/null @@ -1,288 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Speechify -{ - /// - /// Replaces the test config when present. - /// - public readonly partial struct TtsUpdateAgentTestRequestConfig : global::System.IEquatable - { - /// - /// Configuration for a `scenario` test. The runner sends `context` as
- /// a user message and asks an LLM judge to evaluate the agent response
- /// against `success_criteria`. Optional few-shot examples sharpen the
- /// judge's calibration. Use `initial_chat_history` to prepend prior
- /// turns before `context`; when the history already ends with a user
- /// message, `context` may be omitted and the agent is evaluated on
- /// its reply to that last history turn. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsScenarioConfig? ScenarioConfig { get; init; } -#else - public global::Speechify.TtsScenarioConfig? ScenarioConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ScenarioConfig))] -#endif - public bool IsScenarioConfig => ScenarioConfig != null; - - /// - /// Configuration for a `tool` test. The runner sends `context` as a
- /// user message and asserts that the agent calls `expected_tool` with
- /// arguments matching all `parameter_checks`. Use
- /// `initial_chat_history` to test tool invocations that only make
- /// sense mid-conversation. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsToolCallConfig? ToolCallConfig { get; init; } -#else - public global::Speechify.TtsToolCallConfig? ToolCallConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallConfig))] -#endif - public bool IsToolCallConfig => ToolCallConfig != null; - - /// - /// Configuration for a `simulation` test. An AI caller drives a
- /// multi-turn conversation with the agent according to `scenario`.
- /// After `max_turns` exchanges (or when the agent ends the call), an
- /// LLM judge evaluates whether `success_condition` was met.
- /// Use `initial_chat_history` to seed the conversation at a specific
- /// mid-flow state. - ///
-#if NET6_0_OR_GREATER - public global::Speechify.TtsSimulationConfig? SimulationConfig { get; init; } -#else - public global::Speechify.TtsSimulationConfig? SimulationConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SimulationConfig))] -#endif - public bool IsSimulationConfig => SimulationConfig != null; - /// - /// - /// - public static implicit operator TtsUpdateAgentTestRequestConfig(global::Speechify.TtsScenarioConfig value) => new TtsUpdateAgentTestRequestConfig((global::Speechify.TtsScenarioConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsScenarioConfig?(TtsUpdateAgentTestRequestConfig @this) => @this.ScenarioConfig; - - /// - /// - /// - public TtsUpdateAgentTestRequestConfig(global::Speechify.TtsScenarioConfig? value) - { - ScenarioConfig = value; - } - - /// - /// - /// - public static implicit operator TtsUpdateAgentTestRequestConfig(global::Speechify.TtsToolCallConfig value) => new TtsUpdateAgentTestRequestConfig((global::Speechify.TtsToolCallConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsToolCallConfig?(TtsUpdateAgentTestRequestConfig @this) => @this.ToolCallConfig; - - /// - /// - /// - public TtsUpdateAgentTestRequestConfig(global::Speechify.TtsToolCallConfig? value) - { - ToolCallConfig = value; - } - - /// - /// - /// - public static implicit operator TtsUpdateAgentTestRequestConfig(global::Speechify.TtsSimulationConfig value) => new TtsUpdateAgentTestRequestConfig((global::Speechify.TtsSimulationConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsSimulationConfig?(TtsUpdateAgentTestRequestConfig @this) => @this.SimulationConfig; - - /// - /// - /// - public TtsUpdateAgentTestRequestConfig(global::Speechify.TtsSimulationConfig? value) - { - SimulationConfig = value; - } - - /// - /// - /// - public TtsUpdateAgentTestRequestConfig( - global::Speechify.TtsScenarioConfig? scenarioConfig, - global::Speechify.TtsToolCallConfig? toolCallConfig, - global::Speechify.TtsSimulationConfig? simulationConfig - ) - { - ScenarioConfig = scenarioConfig; - ToolCallConfig = toolCallConfig; - SimulationConfig = simulationConfig; - } - - /// - /// - /// - public object? Object => - SimulationConfig as object ?? - ToolCallConfig as object ?? - ScenarioConfig as object - ; - - /// - /// - /// - public override string? ToString() => - ScenarioConfig?.ToString() ?? - ToolCallConfig?.ToString() ?? - SimulationConfig?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsScenarioConfig && !IsToolCallConfig && !IsSimulationConfig || !IsScenarioConfig && IsToolCallConfig && !IsSimulationConfig || !IsScenarioConfig && !IsToolCallConfig && IsSimulationConfig; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? scenarioConfig = null, - global::System.Func? toolCallConfig = null, - global::System.Func? simulationConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsScenarioConfig && scenarioConfig != null) - { - return scenarioConfig(ScenarioConfig!); - } - else if (IsToolCallConfig && toolCallConfig != null) - { - return toolCallConfig(ToolCallConfig!); - } - else if (IsSimulationConfig && simulationConfig != null) - { - return simulationConfig(SimulationConfig!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? scenarioConfig = null, - global::System.Action? toolCallConfig = null, - global::System.Action? simulationConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsScenarioConfig) - { - scenarioConfig?.Invoke(ScenarioConfig!); - } - else if (IsToolCallConfig) - { - toolCallConfig?.Invoke(ToolCallConfig!); - } - else if (IsSimulationConfig) - { - simulationConfig?.Invoke(SimulationConfig!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - ScenarioConfig, - typeof(global::Speechify.TtsScenarioConfig), - ToolCallConfig, - typeof(global::Speechify.TtsToolCallConfig), - SimulationConfig, - typeof(global::Speechify.TtsSimulationConfig), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TtsUpdateAgentTestRequestConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(ScenarioConfig, other.ScenarioConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallConfig, other.ToolCallConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(SimulationConfig, other.SimulationConfig) - ; - } - - /// - /// - /// - public static bool operator ==(TtsUpdateAgentTestRequestConfig obj1, TtsUpdateAgentTestRequestConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TtsUpdateAgentTestRequestConfig obj1, TtsUpdateAgentTestRequestConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TtsUpdateAgentTestRequestConfig o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateDynamicVariablesRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateDynamicVariablesRequest.Json.g.cs deleted file mode 100644 index 478c58b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateDynamicVariablesRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateDynamicVariablesRequest - { - /// - /// 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::Speechify.TtsUpdateDynamicVariablesRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateDynamicVariablesRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateDynamicVariablesRequest; - } - - /// - /// 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::Speechify.TtsUpdateDynamicVariablesRequest? 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::Speechify.TtsUpdateDynamicVariablesRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateDynamicVariablesRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateDynamicVariablesRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateDynamicVariablesRequest.g.cs deleted file mode 100644 index 0c634a4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateDynamicVariablesRequest.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// PATCH body for `PATCH /v1/agents/{id}/variables`. Replaces the
- /// stored variable list wholesale. Pass an empty array to clear all
- /// variables. Up to 20 variables per agent. - ///
- public sealed partial class TtsUpdateDynamicVariablesRequest - { - /// - /// The new variable list. Replaces the existing list entirely. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("variables")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Variables { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The new variable list. Replaces the existing list entirely. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateDynamicVariablesRequest( - global::System.Collections.Generic.IList variables) - { - this.Variables = variables ?? throw new global::System.ArgumentNullException(nameof(variables)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateDynamicVariablesRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateEvaluationConfigRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateEvaluationConfigRequest.Json.g.cs deleted file mode 100644 index 2d06ac1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateEvaluationConfigRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateEvaluationConfigRequest - { - /// - /// 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::Speechify.TtsUpdateEvaluationConfigRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateEvaluationConfigRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateEvaluationConfigRequest; - } - - /// - /// 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::Speechify.TtsUpdateEvaluationConfigRequest? 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::Speechify.TtsUpdateEvaluationConfigRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateEvaluationConfigRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateEvaluationConfigRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateEvaluationConfigRequest.g.cs deleted file mode 100644 index 39faeea..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateEvaluationConfigRequest.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsUpdateEvaluationConfigRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("criteria")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Criteria { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("data_collection")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList DataCollection { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateEvaluationConfigRequest( - global::System.Collections.Generic.IList criteria, - global::System.Collections.Generic.IList dataCollection) - { - this.Criteria = criteria ?? throw new global::System.ArgumentNullException(nameof(criteria)); - this.DataCollection = dataCollection ?? throw new global::System.ArgumentNullException(nameof(dataCollection)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateEvaluationConfigRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateKnowledgeBaseRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateKnowledgeBaseRequest.Json.g.cs deleted file mode 100644 index fcd4440..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateKnowledgeBaseRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateKnowledgeBaseRequest - { - /// - /// 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::Speechify.TtsUpdateKnowledgeBaseRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateKnowledgeBaseRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateKnowledgeBaseRequest; - } - - /// - /// 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::Speechify.TtsUpdateKnowledgeBaseRequest? 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::Speechify.TtsUpdateKnowledgeBaseRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateKnowledgeBaseRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateKnowledgeBaseRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateKnowledgeBaseRequest.g.cs deleted file mode 100644 index 65b3ab4..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateKnowledgeBaseRequest.g.cs +++ /dev/null @@ -1,52 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsUpdateKnowledgeBaseRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateKnowledgeBaseRequest( - string? name, - string? description) - { - this.Name = name; - this.Description = description; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateKnowledgeBaseRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateMemberRoleRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateMemberRoleRequest.Json.g.cs deleted file mode 100644 index 54e5b12..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateMemberRoleRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateMemberRoleRequest - { - /// - /// 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::Speechify.TtsUpdateMemberRoleRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateMemberRoleRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateMemberRoleRequest; - } - - /// - /// 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::Speechify.TtsUpdateMemberRoleRequest? 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::Speechify.TtsUpdateMemberRoleRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateMemberRoleRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateMemberRoleRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateMemberRoleRequest.g.cs deleted file mode 100644 index 7018f3b..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateMemberRoleRequest.g.cs +++ /dev/null @@ -1,53 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class TtsUpdateMemberRoleRequest - { - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsMemberRoleJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Speechify.TtsMemberRole Role { 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. - /// - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateMemberRoleRequest( - global::Speechify.TtsMemberRole role) - { - this.Role = role; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateMemberRoleRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequest.Json.g.cs deleted file mode 100644 index f5277d1..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateToolRequest - { - /// - /// 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::Speechify.TtsUpdateToolRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateToolRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateToolRequest; - } - - /// - /// 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::Speechify.TtsUpdateToolRequest? 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::Speechify.TtsUpdateToolRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateToolRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateToolRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequest.g.cs deleted file mode 100644 index c7429fb..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequest.g.cs +++ /dev/null @@ -1,62 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// All fields optional. `kind` is immutable — create a new tool to change it. - /// - public sealed partial class TtsUpdateToolRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - public string? Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("description")] - public string? Description { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("config")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsUpdateToolRequestConfigJsonConverter))] - public global::Speechify.TtsUpdateToolRequestConfig? Config { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateToolRequest( - string? name, - string? description, - global::Speechify.TtsUpdateToolRequestConfig? config) - { - this.Name = name; - this.Description = description; - this.Config = config; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateToolRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequestConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequestConfig.Json.g.cs deleted file mode 100644 index a022aa0..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequestConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct TtsUpdateToolRequestConfig - { - /// - /// 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::Speechify.TtsUpdateToolRequestConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateToolRequestConfig), - jsonSerializerContext) as global::Speechify.TtsUpdateToolRequestConfig?; - } - - /// - /// 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::Speechify.TtsUpdateToolRequestConfig? 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::Speechify.TtsUpdateToolRequestConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateToolRequestConfig?; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequestConfig.g.cs deleted file mode 100644 index 8ccb851..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateToolRequestConfig.g.cs +++ /dev/null @@ -1,273 +0,0 @@ -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public readonly partial struct TtsUpdateToolRequestConfig : global::System.IEquatable - { - /// - /// Config shape for `kind=system`. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsSystemToolConfig? SystemToolConfig { get; init; } -#else - public global::Speechify.TtsSystemToolConfig? SystemToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemToolConfig))] -#endif - public bool IsSystemToolConfig => SystemToolConfig != null; - - /// - /// Config shape for `kind=webhook`. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsWebhookToolConfig? WebhookToolConfig { get; init; } -#else - public global::Speechify.TtsWebhookToolConfig? WebhookToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebhookToolConfig))] -#endif - public bool IsWebhookToolConfig => WebhookToolConfig != null; - - /// - /// Config shape for `kind=client`. Execution happens in the caller's browser / SDK. - /// -#if NET6_0_OR_GREATER - public global::Speechify.TtsClientToolConfig? ClientToolConfig { get; init; } -#else - public global::Speechify.TtsClientToolConfig? ClientToolConfig { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientToolConfig))] -#endif - public bool IsClientToolConfig => ClientToolConfig != null; - /// - /// - /// - public static implicit operator TtsUpdateToolRequestConfig(global::Speechify.TtsSystemToolConfig value) => new TtsUpdateToolRequestConfig((global::Speechify.TtsSystemToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsSystemToolConfig?(TtsUpdateToolRequestConfig @this) => @this.SystemToolConfig; - - /// - /// - /// - public TtsUpdateToolRequestConfig(global::Speechify.TtsSystemToolConfig? value) - { - SystemToolConfig = value; - } - - /// - /// - /// - public static implicit operator TtsUpdateToolRequestConfig(global::Speechify.TtsWebhookToolConfig value) => new TtsUpdateToolRequestConfig((global::Speechify.TtsWebhookToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsWebhookToolConfig?(TtsUpdateToolRequestConfig @this) => @this.WebhookToolConfig; - - /// - /// - /// - public TtsUpdateToolRequestConfig(global::Speechify.TtsWebhookToolConfig? value) - { - WebhookToolConfig = value; - } - - /// - /// - /// - public static implicit operator TtsUpdateToolRequestConfig(global::Speechify.TtsClientToolConfig value) => new TtsUpdateToolRequestConfig((global::Speechify.TtsClientToolConfig?)value); - - /// - /// - /// - public static implicit operator global::Speechify.TtsClientToolConfig?(TtsUpdateToolRequestConfig @this) => @this.ClientToolConfig; - - /// - /// - /// - public TtsUpdateToolRequestConfig(global::Speechify.TtsClientToolConfig? value) - { - ClientToolConfig = value; - } - - /// - /// - /// - public TtsUpdateToolRequestConfig( - global::Speechify.TtsSystemToolConfig? systemToolConfig, - global::Speechify.TtsWebhookToolConfig? webhookToolConfig, - global::Speechify.TtsClientToolConfig? clientToolConfig - ) - { - SystemToolConfig = systemToolConfig; - WebhookToolConfig = webhookToolConfig; - ClientToolConfig = clientToolConfig; - } - - /// - /// - /// - public object? Object => - ClientToolConfig as object ?? - WebhookToolConfig as object ?? - SystemToolConfig as object - ; - - /// - /// - /// - public override string? ToString() => - SystemToolConfig?.ToString() ?? - WebhookToolConfig?.ToString() ?? - ClientToolConfig?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsSystemToolConfig && !IsWebhookToolConfig && !IsClientToolConfig || !IsSystemToolConfig && IsWebhookToolConfig && !IsClientToolConfig || !IsSystemToolConfig && !IsWebhookToolConfig && IsClientToolConfig; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? systemToolConfig = null, - global::System.Func? webhookToolConfig = null, - global::System.Func? clientToolConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsSystemToolConfig && systemToolConfig != null) - { - return systemToolConfig(SystemToolConfig!); - } - else if (IsWebhookToolConfig && webhookToolConfig != null) - { - return webhookToolConfig(WebhookToolConfig!); - } - else if (IsClientToolConfig && clientToolConfig != null) - { - return clientToolConfig(ClientToolConfig!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? systemToolConfig = null, - global::System.Action? webhookToolConfig = null, - global::System.Action? clientToolConfig = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsSystemToolConfig) - { - systemToolConfig?.Invoke(SystemToolConfig!); - } - else if (IsWebhookToolConfig) - { - webhookToolConfig?.Invoke(WebhookToolConfig!); - } - else if (IsClientToolConfig) - { - clientToolConfig?.Invoke(ClientToolConfig!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - SystemToolConfig, - typeof(global::Speechify.TtsSystemToolConfig), - WebhookToolConfig, - typeof(global::Speechify.TtsWebhookToolConfig), - ClientToolConfig, - typeof(global::Speechify.TtsClientToolConfig), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(TtsUpdateToolRequestConfig other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemToolConfig, other.SystemToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) - ; - } - - /// - /// - /// - public static bool operator ==(TtsUpdateToolRequestConfig obj1, TtsUpdateToolRequestConfig obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(TtsUpdateToolRequestConfig obj1, TtsUpdateToolRequestConfig obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is TtsUpdateToolRequestConfig o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateWorkspaceRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateWorkspaceRequest.Json.g.cs deleted file mode 100644 index 7ff40ea..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateWorkspaceRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsUpdateWorkspaceRequest - { - /// - /// 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::Speechify.TtsUpdateWorkspaceRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsUpdateWorkspaceRequest), - jsonSerializerContext) as global::Speechify.TtsUpdateWorkspaceRequest; - } - - /// - /// 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::Speechify.TtsUpdateWorkspaceRequest? 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::Speechify.TtsUpdateWorkspaceRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsUpdateWorkspaceRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsUpdateWorkspaceRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateWorkspaceRequest.g.cs deleted file mode 100644 index 03b5ce3..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsUpdateWorkspaceRequest.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Body for PATCH /v1/tenants/current. - /// - public sealed partial class TtsUpdateWorkspaceRequest - { - /// - /// New display name. Required; must be 120 characters or fewer. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { 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. - /// - /// - /// New display name. Required; must be 120 characters or fewer. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsUpdateWorkspaceRequest( - string name) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - } - - /// - /// Initializes a new instance of the class. - /// - public TtsUpdateWorkspaceRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfig.Json.g.cs deleted file mode 100644 index 96f4e84..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfig.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsWebhookToolConfig - { - /// - /// 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::Speechify.TtsWebhookToolConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsWebhookToolConfig), - jsonSerializerContext) as global::Speechify.TtsWebhookToolConfig; - } - - /// - /// 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::Speechify.TtsWebhookToolConfig? 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::Speechify.TtsWebhookToolConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsWebhookToolConfig; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsWebhookToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfig.g.cs deleted file mode 100644 index 983f915..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfig.g.cs +++ /dev/null @@ -1,89 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Config shape for `kind=webhook`. - /// - public sealed partial class TtsWebhookToolConfig - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Url { get; set; } - - /// - /// Default Value: POST - /// - [global::System.Text.Json.Serialization.JsonPropertyName("method")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TtsWebhookToolConfigMethodJsonConverter))] - public global::Speechify.TtsWebhookToolConfigMethod? Method { get; set; } - - /// - /// Static headers sent with every call. `Authorization` and `X-Speechify-Signature` are reserved. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("headers")] - public global::System.Collections.Generic.Dictionary? Headers { get; set; } - - /// - /// Per-call timeout in milliseconds.
- /// Default Value: 10000 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("timeout_ms")] - public int? TimeoutMs { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("params")] - public global::System.Collections.Generic.IList? Params { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// Default Value: POST - /// - /// - /// Static headers sent with every call. `Authorization` and `X-Speechify-Signature` are reserved. - /// - /// - /// Per-call timeout in milliseconds.
- /// Default Value: 10000 - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TtsWebhookToolConfig( - string url, - global::Speechify.TtsWebhookToolConfigMethod? method, - global::System.Collections.Generic.Dictionary? headers, - int? timeoutMs, - global::System.Collections.Generic.IList? @params) - { - this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); - this.Method = method; - this.Headers = headers; - this.TimeoutMs = timeoutMs; - this.Params = @params; - } - - /// - /// Initializes a new instance of the class. - /// - public TtsWebhookToolConfig() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigHeaders.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigHeaders.Json.g.cs deleted file mode 100644 index 06cf558..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigHeaders.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class TtsWebhookToolConfigHeaders - { - /// - /// 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::Speechify.TtsWebhookToolConfigHeaders? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.TtsWebhookToolConfigHeaders), - jsonSerializerContext) as global::Speechify.TtsWebhookToolConfigHeaders; - } - - /// - /// 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::Speechify.TtsWebhookToolConfigHeaders? 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::Speechify.TtsWebhookToolConfigHeaders), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TtsWebhookToolConfigHeaders; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigHeaders.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigHeaders.g.cs deleted file mode 100644 index bf5ca2c..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigHeaders.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Static headers sent with every call. `Authorization` and `X-Speechify-Signature` are reserved. - /// - public sealed partial class TtsWebhookToolConfigHeaders - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigMethod.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigMethod.g.cs deleted file mode 100644 index b3a68f2..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.TtsWebhookToolConfigMethod.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Default Value: POST - /// - public enum TtsWebhookToolConfigMethod - { - /// - /// - /// - Get, - /// - /// - /// - Post, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class TtsWebhookToolConfigMethodExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this TtsWebhookToolConfigMethod value) - { - return value switch - { - TtsWebhookToolConfigMethod.Get => "GET", - TtsWebhookToolConfigMethod.Post => "POST", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static TtsWebhookToolConfigMethod? ToEnum(string value) - { - return value switch - { - "GET" => TtsWebhookToolConfigMethod.Get, - "POST" => TtsWebhookToolConfigMethod.Post, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateRequest.Json.g.cs deleted file mode 100644 index b3661c5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class UpdateRequest - { - /// - /// 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::Speechify.UpdateRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.UpdateRequest), - jsonSerializerContext) as global::Speechify.UpdateRequest; - } - - /// - /// 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::Speechify.UpdateRequest? 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::Speechify.UpdateRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.UpdateRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.UpdateRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateRequest.g.cs deleted file mode 100644 index 227efe3..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateRequest.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class UpdateRequest - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateResponse.Json.g.cs deleted file mode 100644 index a5b6e59..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class UpdateResponse - { - /// - /// 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::Speechify.UpdateResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.UpdateResponse), - jsonSerializerContext) as global::Speechify.UpdateResponse; - } - - /// - /// 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::Speechify.UpdateResponse? 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::Speechify.UpdateResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.UpdateResponse; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.UpdateResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateResponse.g.cs deleted file mode 100644 index 485a9c5..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateResponse.g.cs +++ /dev/null @@ -1,18 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// Any type - /// - public sealed partial class UpdateResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.UploadDocumentRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UploadDocumentRequest.Json.g.cs deleted file mode 100644 index 042af19..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.UploadDocumentRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public sealed partial class UploadDocumentRequest - { - /// - /// 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::Speechify.UploadDocumentRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.UploadDocumentRequest), - jsonSerializerContext) as global::Speechify.UploadDocumentRequest; - } - - /// - /// 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::Speechify.UploadDocumentRequest? 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::Speechify.UploadDocumentRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.UploadDocumentRequest; - } - - /// - /// 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/Speechify/Generated/Speechify.Models.UploadDocumentRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UploadDocumentRequest.g.cs deleted file mode 100644 index 53af814..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.UploadDocumentRequest.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class UploadDocumentRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("file")] - [global::System.Text.Json.Serialization.JsonRequired] - public required byte[] File { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public UploadDocumentRequest( - byte[] file, - string filename) - { - this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - } - - /// - /// Initializes a new instance of the class. - /// - public UploadDocumentRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.OneOf.2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.OneOf.2.Json.g.cs deleted file mode 100644 index a430e86..0000000 --- a/src/libs/Speechify/Generated/Speechify.OneOf.2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public readonly partial struct OneOf - { - /// - /// 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::Speechify.OneOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Speechify.OneOf), - jsonSerializerContext) as global::Speechify.OneOf?; - } - - /// - /// 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::Speechify.OneOf? 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::Speechify.OneOf), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OneOf?; - } - - /// - /// 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/Speechify/Generated/Speechify.OneOf.2.g.cs b/src/libs/Speechify/Generated/Speechify.OneOf.2.g.cs deleted file mode 100644 index 9121975..0000000 --- a/src/libs/Speechify/Generated/Speechify.OneOf.2.g.cs +++ /dev/null @@ -1,220 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public readonly partial struct OneOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? Value1 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] -#endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - /// - /// - /// - public static implicit operator OneOf(T1 value) => new OneOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(OneOf @this) => @this.Value1; - - /// - /// - /// - public OneOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// - public static implicit operator OneOf(T2 value) => new OneOf((T2?)value); - - /// - /// - /// - public static implicit operator T2?(OneOf @this) => @this.Value2; - - /// - /// - /// - public OneOf(T2? value) - { - Value2 = value; - } - - /// - /// - /// - public OneOf( - T1? value1, - T2? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - - /// - /// - /// - public object? Object => - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1 && value1 != null) - { - return value1(Value1!); - } - else if (IsValue2 && value2 != null) - { - return value2(Value2!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1) - { - value1?.Invoke(Value1!); - } - else if (IsValue2) - { - value2?.Invoke(Value2!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(T1), - Value2, - typeof(T2), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(OneOf other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) - ; - } - - /// - /// - /// - public static bool operator ==(OneOf obj1, OneOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(OneOf obj1, OneOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is OneOf o && Equals(o); - } - } -} diff --git a/src/libs/Speechify/Generated/Speechify.OptionsSupport.g.cs b/src/libs/Speechify/Generated/Speechify.OptionsSupport.g.cs index bfb52e2..f4690a5 100644 --- a/src/libs/Speechify/Generated/Speechify.OptionsSupport.g.cs +++ b/src/libs/Speechify/Generated/Speechify.OptionsSupport.g.cs @@ -54,6 +54,253 @@ public sealed class AutoSDKClientOptions Hooks.Add(hook ?? throw new global::System.ArgumentNullException(nameof(hook))); return this; } + + /// + /// Optional per-request authorization provider invoked before each request is sent. + /// Set this when the client is registered as a singleton in DI but each call needs + /// a fresh credential resolved from a provider, secret-store, or session — instead + /// of mutating the shared Authorizations list at construction time. + /// + public global::Speechify.IAutoSDKAuthorizationProvider? AuthorizationProvider { get; set; } + + /// + /// Convenience helper that registers + /// using so request-level auth is resolved without + /// touching shared client state. + /// + /// + public global::Speechify.AutoSDKClientOptions UseAuthorizationProvider( + global::Speechify.IAutoSDKAuthorizationProvider provider) + { + AuthorizationProvider = provider ?? throw new global::System.ArgumentNullException(nameof(provider)); + if (Hooks.Find(static x => x is global::Speechify.AutoSDKAuthorizationProviderHook) == null) + { + Hooks.Add(new global::Speechify.AutoSDKAuthorizationProviderHook()); + } + + return this; + } + } + + /// + /// A request-level authorization value supplied by . + /// Mirrors the runtime fields the SDK applies for HTTP / OAuth2 / API-key auth without + /// requiring the consumer to construct the generated EndPointAuthorization type. + /// + public readonly struct AutoSDKAuthorizationValue + { + /// + /// Initializes a new . + /// + /// + /// + /// + /// + /// + public AutoSDKAuthorizationValue( + string value, + string scheme = "Bearer", + string? headerName = null, + string location = "Header", + string type = "Http") + { + Value = value ?? string.Empty; + Scheme = string.IsNullOrWhiteSpace(scheme) ? "Bearer" : scheme; + HeaderName = headerName ?? string.Empty; + Location = string.IsNullOrWhiteSpace(location) ? "Header" : location; + Type = string.IsNullOrWhiteSpace(type) ? "Http" : type; + } + + /// The credential value (token, API key, etc.). + public string Value { get; } + + /// The HTTP authorization scheme — typically Bearer, Basic, or Token. + public string Scheme { get; } + + /// The custom header name when is ApiKey; ignored for HTTP/OAuth2 auth. + public string HeaderName { get; } + + /// The credential location — Header, Query, or Cookie. + public string Location { get; } + + /// The auth type — Http, OAuth2, OpenIdConnect, or ApiKey. + public string Type { get; } + + /// Convenience factory for a Bearer token. + public static global::Speechify.AutoSDKAuthorizationValue Bearer(string token) => new(value: token, scheme: "Bearer"); + + /// Convenience factory for an API-key header. + public static global::Speechify.AutoSDKAuthorizationValue ApiKeyHeader(string name, string value) => + new(value: value, headerName: name, location: "Header", type: "ApiKey"); + } + + /// + /// Resolves request-level authorization values without mutating the shared client + /// authorization list. Implementations should be safe to invoke concurrently — + /// the hook calls them once per outgoing request. + /// + public interface IAutoSDKAuthorizationProvider + { + /// + /// Returns one or more values to apply to + /// the current request, or an empty list / null to leave the request as-is. + /// + /// + global::System.Threading.Tasks.Task?> ResolveAsync( + global::Speechify.AutoSDKHookContext context); + } + + /// + /// Marker keys stamped onto outgoing + /// instances so consumer s — and any + /// other transport-layer code that runs after AutoSDK's send pipeline — can observe whether + /// the resolved Authorization is call-scoped and opt out of overwriting it with a + /// rotation-aware account-level credential. + /// + public static class AutoSDKHttpRequestOptions + { + /// + /// Key under which records the marker. Exposed + /// for handlers that target frameworks older than .NET 5 and need to read the value + /// through the legacy HttpRequestMessage.Properties bag. + /// + public const string AuthorizationOverrideKey = "AutoSDK.AuthorizationOverride"; + +#if NET5_0_OR_GREATER + /// + /// Strongly-typed for + /// the call-scoped Authorization marker on .NET 5+ targets. Consumers should prefer this + /// over the legacy HttpRequestMessage.Properties bag where available. + /// + public static readonly global::System.Net.Http.HttpRequestOptionsKey AuthorizationOverride = + new global::System.Net.Http.HttpRequestOptionsKey(AuthorizationOverrideKey); +#endif + + /// + /// Stamps the call-scoped Authorization marker on . AutoSDK's + /// built-in calls this whenever the + /// resolved auth came from a per-request override or a client-level + /// . Hand-written SDK extensions that set a + /// non-default Authorization header (e.g. a session-scoped bearer returned by an + /// upstream poll) should call this too so downstream rotation handlers know to skip the + /// overwrite. + /// + /// + public static void StampAuthorizationOverride( + global::System.Net.Http.HttpRequestMessage? request) + { + if (request is null) + { + return; + } + +#if NET5_0_OR_GREATER + request.Options.Set(AuthorizationOverride, true); +#else +#pragma warning disable CS0618 // HttpRequestMessage.Properties is obsolete in NET5+, but the only option below it. + request.Properties[AuthorizationOverrideKey] = true; +#pragma warning restore CS0618 +#endif + } + + /// + /// Returns true when previously marked the + /// request as carrying a call-scoped Authorization. + /// + /// + public static bool HasAuthorizationOverride( + global::System.Net.Http.HttpRequestMessage? request) + { + if (request is null) + { + return false; + } + +#if NET5_0_OR_GREATER + return request.Options.TryGetValue(AuthorizationOverride, out var value) && value; +#else +#pragma warning disable CS0618 + return request.Properties.TryGetValue(AuthorizationOverrideKey, out var raw) && + raw is bool flag && + flag; +#pragma warning restore CS0618 +#endif + } + } + + /// + /// Built-in that consults + /// before every outgoing + /// request and stamps the resolved values onto the . + /// + public sealed class AutoSDKAuthorizationProviderHook : global::Speechify.AutoSDKHook + { + /// + public override async global::System.Threading.Tasks.Task OnBeforeRequestAsync( + global::Speechify.AutoSDKHookContext context) + { + context = context ?? throw new global::System.ArgumentNullException(nameof(context)); + + if (context.Request == null) + { + return; + } + + var perRequest = context.RequestOptions?.Authorizations; + if (perRequest != null && perRequest.Count > 0) + { + for (var index = 0; index < perRequest.Count; index++) + { + ApplyAuthorization(context.Request, perRequest[index]); + } + + global::Speechify.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request); + return; + } + + var provider = context.ClientOptions?.AuthorizationProvider; + if (provider == null) + { + return; + } + + var resolved = await provider.ResolveAsync(context).ConfigureAwait(false); + if (resolved == null || resolved.Count == 0) + { + return; + } + + for (var index = 0; index < resolved.Count; index++) + { + ApplyAuthorization(context.Request, resolved[index]); + } + + global::Speechify.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request); + } + + private static void ApplyAuthorization( + global::System.Net.Http.HttpRequestMessage request, + global::Speechify.AutoSDKAuthorizationValue authorization) + { + switch (authorization.Type) + { + case "Http": + case "OAuth2": + case "OpenIdConnect": + request.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: authorization.Scheme, + parameter: authorization.Value); + break; + case "ApiKey": + if (string.Equals(authorization.Location, "Header", global::System.StringComparison.OrdinalIgnoreCase) && + !string.IsNullOrEmpty(authorization.HeaderName)) + { + request.Headers.Remove(authorization.HeaderName); + request.Headers.TryAddWithoutValidation(authorization.HeaderName, authorization.Value ?? string.Empty); + } + break; + } + } } /// @@ -87,6 +334,15 @@ public sealed class AutoSDKRequestOptions /// Overrides response buffering for this request when set. /// public bool? ReadResponseAsString { get; set; } + + /// + /// Optional per-request authorization values. When non-empty, the built-in + /// applies these instead of consulting + /// for this request only. + /// Useful for multi-tenant routing or "act-as" admin tooling that needs a different + /// credential per call without mutating shared client state. + /// + public global::System.Collections.Generic.IReadOnlyList? Authorizations { get; set; } } /// @@ -101,9 +357,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +523,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +556,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::Speechify.AutoSDKHookContext @@ -271,6 +575,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +644,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::Speechify.AutoSDKClientOptions clientOptions, global::Speechify.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Speechify.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::Speechify.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/Speechify/Generated/Speechify.ResponseStream.g.cs b/src/libs/Speechify/Generated/Speechify.ResponseStream.g.cs new file mode 100644 index 0000000..ba28c4b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ResponseStream.g.cs @@ -0,0 +1,117 @@ + +#nullable enable + +namespace Speechify +{ + internal sealed class ResponseStream : global::System.IO.Stream + { + private readonly global::System.Net.Http.HttpResponseMessage _response; + private readonly global::System.IO.Stream _stream; + private bool _disposed; + + public ResponseStream( + global::System.Net.Http.HttpResponseMessage response, + global::System.IO.Stream stream) + { + _response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + _stream = stream ?? throw new global::System.ArgumentNullException(nameof(stream)); + } + + public override bool CanRead => _stream.CanRead; + public override bool CanSeek => _stream.CanSeek; + public override bool CanWrite => _stream.CanWrite; + public override bool CanTimeout => _stream.CanTimeout; + public override long Length => _stream.Length; + + public override long Position + { + get => _stream.Position; + set => _stream.Position = value; + } + + public override int ReadTimeout + { + get => _stream.ReadTimeout; + set => _stream.ReadTimeout = value; + } + + public override int WriteTimeout + { + get => _stream.WriteTimeout; + set => _stream.WriteTimeout = value; + } + + public override void Flush() => _stream.Flush(); + + public override global::System.Threading.Tasks.Task FlushAsync( + global::System.Threading.CancellationToken cancellationToken) => + _stream.FlushAsync(cancellationToken); + + public override int Read(byte[] buffer, int offset, int count) => + _stream.Read(buffer, offset, count); + + public override global::System.Threading.Tasks.Task ReadAsync( + byte[] buffer, + int offset, + int count, + global::System.Threading.CancellationToken cancellationToken) => + _stream.ReadAsync(buffer, offset, count, cancellationToken); + +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_0_OR_GREATER || NET5_0_OR_GREATER + public override global::System.Threading.Tasks.ValueTask ReadAsync( + global::System.Memory buffer, + global::System.Threading.CancellationToken cancellationToken = default) => + _stream.ReadAsync(buffer, cancellationToken); +#endif + + public override long Seek(long offset, global::System.IO.SeekOrigin origin) => + _stream.Seek(offset, origin); + + public override void SetLength(long value) => + _stream.SetLength(value); + + public override void Write(byte[] buffer, int offset, int count) => + _stream.Write(buffer, offset, count); + + public override global::System.Threading.Tasks.Task WriteAsync( + byte[] buffer, + int offset, + int count, + global::System.Threading.CancellationToken cancellationToken) => + _stream.WriteAsync(buffer, offset, count, cancellationToken); + +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_0_OR_GREATER || NET5_0_OR_GREATER + public override global::System.Threading.Tasks.ValueTask WriteAsync( + global::System.ReadOnlyMemory buffer, + global::System.Threading.CancellationToken cancellationToken = default) => + _stream.WriteAsync(buffer, cancellationToken); +#endif + + protected override void Dispose(bool disposing) + { + if (!_disposed && disposing) + { + _disposed = true; + _stream.Dispose(); + _response.Dispose(); + } + + base.Dispose(disposing); + } + +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_0_OR_GREATER || NET5_0_OR_GREATER + public override async global::System.Threading.Tasks.ValueTask DisposeAsync() + { + if (_disposed) + { + return; + } + + _disposed = true; + await _stream.DisposeAsync().ConfigureAwait(false); + _response.Dispose(); + await base.DisposeAsync().ConfigureAwait(false); + } +#endif + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.Constructors.Bearer.g.cs index ea20686..6165a17 100644 --- a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.Constructors.Bearer.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.Constructors.Bearer.g.cs @@ -26,5 +26,6 @@ partial void Authorizing( ref string apiKey); partial void Authorized( global::System.Net.Http.HttpClient client); + } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs index 63ce936..c20142b 100644 --- a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs @@ -42,7 +42,7 @@ public sealed partial class SpeechifyClient : global::Speechify.ISpeechifyClient /// /// /// - public SubpackageTtsSubpackageTtsAgentsClient SubpackageTtsSubpackageTtsAgents => new SubpackageTtsSubpackageTtsAgentsClient(HttpClient, authorizations: Authorizations, options: Options) + public SubpackageTtsSubpackageTtsAudioClient SubpackageTtsSubpackageTtsAudio => new SubpackageTtsSubpackageTtsAudioClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -51,97 +51,7 @@ public sealed partial class SpeechifyClient : global::Speechify.ISpeechifyClient /// /// /// - public SubpackageTtsSubpackageTtsAudioClient SubpackageTtsSubpackageTtsAudio => new SubpackageTtsSubpackageTtsAudioClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsAuthClient SubpackageTtsSubpackageTtsAuth => new SubpackageTtsSubpackageTtsAuthClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsConversationsClient SubpackageTtsSubpackageTtsConversations => new SubpackageTtsSubpackageTtsConversationsClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsKnowledgeBasesClient SubpackageTtsSubpackageTtsKnowledgeBases => new SubpackageTtsSubpackageTtsKnowledgeBasesClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsMemoriesClient SubpackageTtsSubpackageTtsMemories => new SubpackageTtsSubpackageTtsMemoriesClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsOutboundCallsClient SubpackageTtsSubpackageTtsOutboundCalls => new SubpackageTtsSubpackageTtsOutboundCallsClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsPhoneNumbersClient SubpackageTtsSubpackageTtsPhoneNumbers => new SubpackageTtsSubpackageTtsPhoneNumbersClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsSipTrunksClient SubpackageTtsSubpackageTtsSipTrunks => new SubpackageTtsSubpackageTtsSipTrunksClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsToolsClient SubpackageTtsSubpackageTtsTools => new SubpackageTtsSubpackageTtsToolsClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsVoicesClient SubpackageTtsSubpackageTtsVoices => new SubpackageTtsSubpackageTtsVoicesClient(HttpClient, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SubpackageTtsSubpackageTtsWorkspacesClient SubpackageTtsSubpackageTtsWorkspaces => new SubpackageTtsSubpackageTtsWorkspacesClient(HttpClient, authorizations: Authorizations, options: Options) + public SubpackageTtsSubpackageTtsVoicesClient SubpackageTtsSubpackageTtsVoices => new SubpackageTtsSubpackageTtsVoicesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -169,6 +79,27 @@ public SpeechifyClient( { } + /// + /// Creates a new instance of the SpeechifyClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SpeechifyClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + /// /// Creates a new instance of the SpeechifyClient. /// If no httpClient is provided, a new one will be created. @@ -180,10 +111,10 @@ public SpeechifyClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SpeechifyClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachKnowledgeBase.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachKnowledgeBase.g.cs deleted file mode 100644 index 7f2b307..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachKnowledgeBase.g.cs +++ /dev/null @@ -1,369 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_AttachKnowledgeBaseSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_AttachKnowledgeBaseSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_AttachKnowledgeBaseSecurityRequirement0, - }; - partial void PrepareAttachKnowledgeBaseArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref string kbId); - partial void PrepareAttachKnowledgeBaseRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - string kbId); - partial void ProcessAttachKnowledgeBaseResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Attach Knowledge Base
- /// Attach a knowledge base to an agent. The `search_knowledge` tool
- /// is auto-registered on the next conversation and can only query the
- /// attached knowledge bases. - ///
- /// - /// - /// 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 AttachKnowledgeBaseAsync( - string id, - string kbId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareAttachKnowledgeBaseArguments( - httpClient: HttpClient, - id: ref id, - kbId: ref kbId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_AttachKnowledgeBaseSecurityRequirements, - operationName: "AttachKnowledgeBaseAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/knowledge-bases/{kbId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareAttachKnowledgeBaseRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - kbId: kbId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachKnowledgeBase", - methodName: "AttachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachKnowledgeBase", - methodName: "AttachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachKnowledgeBase", - methodName: "AttachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.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); - ProcessAttachKnowledgeBaseResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachKnowledgeBase", - methodName: "AttachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachKnowledgeBase", - methodName: "AttachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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); - - try - { - __response.EnsureSuccessStatusCode(); - - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachTest.g.cs deleted file mode 100644 index 12d152e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachTest.g.cs +++ /dev/null @@ -1,370 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_AttachTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_AttachTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_AttachTestSecurityRequirement0, - }; - partial void PrepareAttachTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref string agentId); - partial void PrepareAttachTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - string agentId); - partial void ProcessAttachTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Attach Test
- /// Attach a test to an additional agent. After this call, the test
- /// will also run as part of that agent's regression suite (and
- /// against its prompt + tool config when invoked with
- /// `agent_id = {agentId}`). Idempotent. - ///
- /// - /// - /// 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 AttachTestAsync( - string id, - string agentId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareAttachTestArguments( - httpClient: HttpClient, - id: ref id, - agentId: ref agentId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_AttachTestSecurityRequirements, - operationName: "AttachTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}/attachments/{agentId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareAttachTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - agentId: agentId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTest", - methodName: "AttachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTest", - methodName: "AttachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTest", - methodName: "AttachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.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); - ProcessAttachTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTest", - methodName: "AttachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTest", - methodName: "AttachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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); - - try - { - __response.EnsureSuccessStatusCode(); - - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachTool.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachTool.g.cs deleted file mode 100644 index 41b0be3..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.AttachTool.g.cs +++ /dev/null @@ -1,367 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_AttachToolSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_AttachToolSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_AttachToolSecurityRequirement0, - }; - partial void PrepareAttachToolArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref string toolId); - partial void PrepareAttachToolRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - string toolId); - partial void ProcessAttachToolResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Attach Tool
- /// Attach an existing tool to the agent so the LLM can call it. - ///
- /// - /// - /// 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 AttachToolAsync( - string id, - string toolId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareAttachToolArguments( - httpClient: HttpClient, - id: ref id, - toolId: ref toolId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_AttachToolSecurityRequirements, - operationName: "AttachToolAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/tools/{toolId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareAttachToolRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - toolId: toolId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTool", - methodName: "AttachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTool", - methodName: "AttachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTool", - methodName: "AttachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.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); - ProcessAttachToolResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTool", - methodName: "AttachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AttachTool", - methodName: "AttachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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); - - try - { - __response.EnsureSuccessStatusCode(); - - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Create.g.cs deleted file mode 100644 index ac43ded..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Create.g.cs +++ /dev/null @@ -1,471 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSecurityRequirement0, - }; - partial void PrepareCreateArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateAgentRequest request); - partial void PrepareCreateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateAgentRequest request); - partial void ProcessCreateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create
- /// Create a voice agent. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateAgentRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSecurityRequirements, - operationName: "CreateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/agents", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.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); - ProcessCreateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/agents\"", - 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); - ProcessCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgent.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgent.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create
- /// Create a voice agent. - ///
- /// - /// - /// Optional. Server derives slug from name with a random suffix when omitted; if you supply your own, a collision returns 400 'slug already taken'. - /// - /// - /// - /// Spoken verbatim at session start — no LLM round trip. - /// - /// - /// Default Value: en - /// - /// - /// Optional chat model slug. Leave empty to use the Speechify default. - /// - /// - /// Voice slug from the VMS catalog (see GET /v1/voices). Required — the server rejects writes with an unknown or empty slug. - /// - /// - /// - /// - /// Default Value: false - /// - /// - /// - /// Optional per-agent hostname allowlist (see Agent schema). - /// - /// - /// Default Value: false - /// - /// - /// Default Value: 90 - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - string name, - string voiceId, - string? slug = default, - string? prompt = default, - string? firstMessage = default, - string? language = default, - string? llmModel = default, - double? temperature = default, - object? config = default, - bool? isPublic = default, - global::System.Collections.Generic.IList? allowedOrigins = default, - global::System.Collections.Generic.IList? hostnameAllowlist = default, - bool? memoryEnabled = default, - int? memoryRetentionDays = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateAgentRequest - { - Name = name, - Slug = slug, - Prompt = prompt, - FirstMessage = firstMessage, - Language = language, - LlmModel = llmModel, - VoiceId = voiceId, - Temperature = temperature, - Config = config, - IsPublic = isPublic, - AllowedOrigins = allowedOrigins, - HostnameAllowlist = hostnameAllowlist, - MemoryEnabled = memoryEnabled, - MemoryRetentionDays = memoryRetentionDays, - }; - - return await CreateAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateConversation.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateConversation.g.cs deleted file mode 100644 index 73067aa..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateConversation.g.cs +++ /dev/null @@ -1,445 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateConversationSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateConversationSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateConversationSecurityRequirement0, - }; - partial void PrepareCreateConversationArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsCreateConversationRequest request); - partial void PrepareCreateConversationRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsCreateConversationRequest request); - partial void ProcessCreateConversationResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateConversationResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Conversation
- /// Start a new voice conversation with the agent. Returns a realtime
- /// voice session + short-lived client token so the caller can
- /// connect the audio pipeline directly. The agent is dispatched
- /// server-side; no additional client action required.
- /// Pass `dynamic_variables` to supply per-session values that override
- /// the agent's stored variable defaults for this one conversation.
- /// Keys in the `system__` namespace are rejected at this boundary. - ///
- /// - /// - /// 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 CreateConversationAsync( - string id, - - global::Speechify.TtsCreateConversationRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateConversationArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateConversationSecurityRequirements, - operationName: "CreateConversationAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/conversations", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateConversationRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateConversation", - methodName: "CreateConversationAsync", - pathTemplate: "$\"/v1/agents/{id}/conversations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateConversation", - methodName: "CreateConversationAsync", - pathTemplate: "$\"/v1/agents/{id}/conversations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateConversation", - methodName: "CreateConversationAsync", - pathTemplate: "$\"/v1/agents/{id}/conversations\"", - 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::Speechify.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); - ProcessCreateConversationResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateConversation", - methodName: "CreateConversationAsync", - pathTemplate: "$\"/v1/agents/{id}/conversations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateConversation", - methodName: "CreateConversationAsync", - pathTemplate: "$\"/v1/agents/{id}/conversations\"", - 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); - ProcessCreateConversationResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsCreateConversationResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsCreateConversationResponse.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create Conversation
- /// Start a new voice conversation with the agent. Returns a realtime
- /// voice session + short-lived client token so the caller can
- /// connect the audio pipeline directly. The agent is dispatched
- /// server-side; no additional client action required.
- /// Pass `dynamic_variables` to supply per-session values that override
- /// the agent's stored variable defaults for this one conversation.
- /// Keys in the `system__` namespace are rejected at this boundary. - ///
- /// - /// - /// Transport hint. Omit to use the agent's default. - /// - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one conversation. Keys in the
- /// reserved `system__` namespace are rejected. Values must match the
- /// declared type of the corresponding variable definition on the agent. - /// - /// 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 CreateConversationAsync( - string id, - string? transport = default, - object? dynamicVariables = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateConversationRequest - { - Transport = transport, - DynamicVariables = dynamicVariables, - }; - - return await CreateConversationAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateSession.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateSession.g.cs deleted file mode 100644 index e483f50..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateSession.g.cs +++ /dev/null @@ -1,463 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSessionSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSessionSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSessionSecurityRequirement0, - }; - partial void PrepareCreateSessionArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsCreateSessionRequest request); - partial void PrepareCreateSessionRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsCreateSessionRequest request); - partial void ProcessCreateSessionResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateSessionResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Session
- /// Mint a realtime voice session for the given agent. Widget-friendly
- /// counterpart to `createConversation` — same response shape, dual
- /// authentication:
- /// * **Authenticated (Bearer)**: works for any agent the caller
- /// owns. Typical server-to-server flow where the embedding
- /// site's backend mints a token and hands it to the browser so
- /// the API key never reaches the client.
- /// * **Unauthenticated**: works only when `agent.is_public = true`
- /// AND the request's `Origin` header matches `agent.allowed_origins`
- /// (or that list is empty). When `agent.hostname_allowlist` is
- /// non-empty, the `Origin` hostname must additionally be a
- /// member of that list. Used directly by the
- /// `<speechify-agent>` web component.
- /// Responds with the same `CreateConversationResponse` as
- /// `createConversation`. - ///
- /// - /// - /// 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 CreateSessionAsync( - string id, - - global::Speechify.TtsCreateSessionRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateSessionArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSessionSecurityRequirements, - operationName: "CreateSessionAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/sessions", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateSessionRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSession", - methodName: "CreateSessionAsync", - pathTemplate: "$\"/v1/agents/{id}/sessions\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSession", - methodName: "CreateSessionAsync", - pathTemplate: "$\"/v1/agents/{id}/sessions\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSession", - methodName: "CreateSessionAsync", - pathTemplate: "$\"/v1/agents/{id}/sessions\"", - 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::Speechify.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); - ProcessCreateSessionResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSession", - methodName: "CreateSessionAsync", - pathTemplate: "$\"/v1/agents/{id}/sessions\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSession", - methodName: "CreateSessionAsync", - pathTemplate: "$\"/v1/agents/{id}/sessions\"", - 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); - ProcessCreateSessionResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsCreateConversationResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsCreateConversationResponse.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create Session
- /// Mint a realtime voice session for the given agent. Widget-friendly
- /// counterpart to `createConversation` — same response shape, dual
- /// authentication:
- /// * **Authenticated (Bearer)**: works for any agent the caller
- /// owns. Typical server-to-server flow where the embedding
- /// site's backend mints a token and hands it to the browser so
- /// the API key never reaches the client.
- /// * **Unauthenticated**: works only when `agent.is_public = true`
- /// AND the request's `Origin` header matches `agent.allowed_origins`
- /// (or that list is empty). When `agent.hostname_allowlist` is
- /// non-empty, the `Origin` hostname must additionally be a
- /// member of that list. Used directly by the
- /// `<speechify-agent>` web component.
- /// Responds with the same `CreateConversationResponse` as
- /// `createConversation`. - ///
- /// - /// - /// Opaque identifier for the end-user (e.g. your app's user ID). Stamped onto the conversation. Optional - defaults to an anonymous per-session ID. - /// - /// - /// Per-session variable overrides that merge on top of the agent's
- /// stored variable defaults for this one session. Keys in the
- /// reserved `system__` namespace are rejected at this boundary.
- /// Values must match the declared type of the corresponding variable
- /// definition on the agent (a `string` type expects a JSON string,
- /// `number` expects a JSON number, etc.). - /// - /// 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 CreateSessionAsync( - string id, - string? userIdentity = default, - object? dynamicVariables = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateSessionRequest - { - UserIdentity = userIdentity, - DynamicVariables = dynamicVariables, - }; - - return await CreateSessionAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateTest.g.cs deleted file mode 100644 index a99bf5b..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateTest.g.cs +++ /dev/null @@ -1,467 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateTestSecurityRequirement0, - }; - partial void PrepareCreateTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsCreateAgentTestRequest request); - partial void PrepareCreateTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsCreateAgentTestRequest request); - partial void ProcessCreateTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateTestResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Test
- /// Create a new test for the agent. - ///
- /// - /// - /// 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 CreateTestAsync( - string id, - - global::Speechify.TtsCreateAgentTestRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateTestArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateTestSecurityRequirements, - operationName: "CreateTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/tests", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTest", - methodName: "CreateTestAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTest", - methodName: "CreateTestAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTest", - methodName: "CreateTestAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.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); - ProcessCreateTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTest", - methodName: "CreateTestAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTest", - methodName: "CreateTestAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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); - ProcessCreateTestResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTest.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTest.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create Test
- /// Create a new test for the agent. - ///
- /// - /// - /// Short human-readable label for the test. - /// - /// - /// Optional longer description of what this test verifies. - /// - /// - /// Discriminates the shape of `AgentTest.config`.
- /// - `scenario` - send one message to the agent and judge the response with an LLM.
- /// - `tool` - assert that the agent calls a specific tool given a context.
- /// - `simulation` - run a multi-turn conversation between the agent and an AI caller. - /// - /// - /// Type-specific configuration. Must match the shape for the given `type`. - /// - /// - /// Optional tool-mocking config applied during every run of this test. - /// - /// - /// Per-test variable values substituted into string fields of the
- /// config at run-start. Keys use the same rules as agent-level
- /// `DynamicVariable` keys. - /// - /// - /// Folder to place the test in. Omit for root. - /// - /// - /// Optional list of additional agents this test should also run
- /// against. The owner agent (path param) is always attached
- /// implicitly. - /// - /// 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 CreateTestAsync( - string id, - string name, - global::Speechify.TtsTestType type, - global::Speechify.TtsCreateAgentTestRequestConfig config, - string? description = default, - global::Speechify.TtsToolMockConfig? toolMockConfig = default, - object? variables = default, - string? folderId = default, - global::System.Collections.Generic.IList? attachedAgentIds = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateAgentTestRequest - { - Name = name, - Description = description, - Type = type, - Config = config, - ToolMockConfig = toolMockConfig, - Variables = variables, - FolderId = folderId, - AttachedAgentIds = attachedAgentIds, - }; - - return await CreateTestAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateTestFolder.g.cs deleted file mode 100644 index dce1264..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.CreateTestFolder.g.cs +++ /dev/null @@ -1,417 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateTestFolderSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateTestFolderSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateTestFolderSecurityRequirement0, - }; - partial void PrepareCreateTestFolderArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateAgentTestFolderRequest request); - partial void PrepareCreateTestFolderRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateAgentTestFolderRequest request); - partial void ProcessCreateTestFolderResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateTestFolderResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Test Folder
- /// Create a test folder. Max depth is 3. - ///
- /// - /// 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 CreateTestFolderAsync( - - global::Speechify.TtsCreateAgentTestFolderRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateTestFolderArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateTestFolderSecurityRequirements, - operationName: "CreateTestFolderAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/test-folders", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateTestFolderRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTestFolder", - methodName: "CreateTestFolderAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTestFolder", - methodName: "CreateTestFolderAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTestFolder", - methodName: "CreateTestFolderAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.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); - ProcessCreateTestFolderResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTestFolder", - methodName: "CreateTestFolderAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateTestFolder", - methodName: "CreateTestFolderAsync", - pathTemplate: "\"/v1/test-folders\"", - 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); - ProcessCreateTestFolderResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTestFolder.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTestFolder.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create Test Folder
- /// Create a test folder. Max depth is 3. - ///
- /// - /// - /// 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 CreateTestFolderAsync( - string name, - string? parentFolderId = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateAgentTestFolderRequest - { - Name = name, - ParentFolderId = parentFolderId, - }; - - return await CreateTestFolderAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Delete.g.cs deleted file mode 100644 index 9c0a993..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Delete.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteSecurityRequirement0, - }; - partial void PrepareDeleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete
- /// Delete a voice agent. Conversations and attached tools remain. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteSecurityRequirements, - operationName: "DeleteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.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); - ProcessDeleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteMemoriesByCaller.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteMemoriesByCaller.g.cs deleted file mode 100644 index 4179485..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteMemoriesByCaller.g.cs +++ /dev/null @@ -1,434 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteMemoriesByCallerSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteMemoriesByCallerSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteMemoriesByCallerSecurityRequirement0, - }; - partial void PrepareDeleteMemoriesByCallerArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsDeleteMemoriesByCallerRequest request); - partial void PrepareDeleteMemoriesByCallerRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsDeleteMemoriesByCallerRequest request); - partial void ProcessDeleteMemoriesByCallerResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessDeleteMemoriesByCallerResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Delete Memories By Caller
- /// Delete every memory ever extracted for a specific caller on
- /// this agent. Privacy / GDPR surface. Returns the count of rows
- /// soft-deleted; rows become permanently unreachable immediately
- /// and are hard-deleted by the retention job after the tenant's
- /// configured retention window. - ///
- /// - /// - /// 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 DeleteMemoriesByCallerAsync( - string id, - - global::Speechify.TtsDeleteMemoriesByCallerRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareDeleteMemoriesByCallerArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteMemoriesByCallerSecurityRequirements, - operationName: "DeleteMemoriesByCallerAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/memories/delete-by-caller", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteMemoriesByCallerRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteMemoriesByCaller", - methodName: "DeleteMemoriesByCallerAsync", - pathTemplate: "$\"/v1/agents/{id}/memories/delete-by-caller\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteMemoriesByCaller", - methodName: "DeleteMemoriesByCallerAsync", - pathTemplate: "$\"/v1/agents/{id}/memories/delete-by-caller\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteMemoriesByCaller", - methodName: "DeleteMemoriesByCallerAsync", - pathTemplate: "$\"/v1/agents/{id}/memories/delete-by-caller\"", - 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::Speechify.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); - ProcessDeleteMemoriesByCallerResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteMemoriesByCaller", - methodName: "DeleteMemoriesByCallerAsync", - pathTemplate: "$\"/v1/agents/{id}/memories/delete-by-caller\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteMemoriesByCaller", - methodName: "DeleteMemoriesByCallerAsync", - pathTemplate: "$\"/v1/agents/{id}/memories/delete-by-caller\"", - 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); - ProcessDeleteMemoriesByCallerResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsDeleteMemoriesByCallerResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsDeleteMemoriesByCallerResponse.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::Speechify.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(); - } - } - /// - /// Delete Memories By Caller
- /// Delete every memory ever extracted for a specific caller on
- /// this agent. Privacy / GDPR surface. Returns the count of rows
- /// soft-deleted; rows become permanently unreachable immediately
- /// and are hard-deleted by the retention job after the tenant's
- /// configured retention window. - ///
- /// - /// - /// - /// 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 DeleteMemoriesByCallerAsync( - string id, - string agentId, - string callerIdentity, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsDeleteMemoriesByCallerRequest - { - AgentId = agentId, - CallerIdentity = callerIdentity, - }; - - return await DeleteMemoriesByCallerAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteTest.g.cs deleted file mode 100644 index ee72c97..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteTest.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteTestSecurityRequirement0, - }; - partial void PrepareDeleteTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete Test
- /// Delete a test and all its run history. - ///
- /// - /// 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 DeleteTestAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteTestArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteTestSecurityRequirements, - operationName: "DeleteTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTest", - methodName: "DeleteTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTest", - methodName: "DeleteTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTest", - methodName: "DeleteTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.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); - ProcessDeleteTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTest", - methodName: "DeleteTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTest", - methodName: "DeleteTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteTestFolder.g.cs deleted file mode 100644 index a7551d9..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DeleteTestFolder.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteTestFolderSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteTestFolderSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteTestFolderSecurityRequirement0, - }; - partial void PrepareDeleteTestFolderArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteTestFolderRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteTestFolderResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete Test Folder
- /// Soft-delete a folder. Child tests drop back to root. - ///
- /// - /// 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 DeleteTestFolderAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteTestFolderArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteTestFolderSecurityRequirements, - operationName: "DeleteTestFolderAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/test-folders/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteTestFolderRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTestFolder", - methodName: "DeleteTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTestFolder", - methodName: "DeleteTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTestFolder", - methodName: "DeleteTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.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); - ProcessDeleteTestFolderResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTestFolder", - methodName: "DeleteTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteTestFolder", - methodName: "DeleteTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachKnowledgeBase.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachKnowledgeBase.g.cs deleted file mode 100644 index 8c29fe4..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachKnowledgeBase.g.cs +++ /dev/null @@ -1,367 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DetachKnowledgeBaseSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DetachKnowledgeBaseSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DetachKnowledgeBaseSecurityRequirement0, - }; - partial void PrepareDetachKnowledgeBaseArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref string kbId); - partial void PrepareDetachKnowledgeBaseRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - string kbId); - partial void ProcessDetachKnowledgeBaseResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Detach Knowledge Base
- /// Detach a knowledge base from an agent. - ///
- /// - /// - /// 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 DetachKnowledgeBaseAsync( - string id, - string kbId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDetachKnowledgeBaseArguments( - httpClient: HttpClient, - id: ref id, - kbId: ref kbId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DetachKnowledgeBaseSecurityRequirements, - operationName: "DetachKnowledgeBaseAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/knowledge-bases/{kbId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDetachKnowledgeBaseRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - kbId: kbId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachKnowledgeBase", - methodName: "DetachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachKnowledgeBase", - methodName: "DetachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachKnowledgeBase", - methodName: "DetachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.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); - ProcessDetachKnowledgeBaseResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachKnowledgeBase", - methodName: "DetachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachKnowledgeBase", - methodName: "DetachKnowledgeBaseAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases/{kbId}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachTest.g.cs deleted file mode 100644 index 88a825b..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachTest.g.cs +++ /dev/null @@ -1,369 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DetachTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DetachTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DetachTestSecurityRequirement0, - }; - partial void PrepareDetachTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref string agentId); - partial void PrepareDetachTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - string agentId); - partial void ProcessDetachTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Detach Test
- /// Detach a test from an agent. The owner agent (the agent the test
- /// was authored against) cannot be detached; delete the test
- /// instead. - ///
- /// - /// - /// 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 DetachTestAsync( - string id, - string agentId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDetachTestArguments( - httpClient: HttpClient, - id: ref id, - agentId: ref agentId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DetachTestSecurityRequirements, - operationName: "DetachTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}/attachments/{agentId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDetachTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - agentId: agentId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTest", - methodName: "DetachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTest", - methodName: "DetachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTest", - methodName: "DetachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.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); - ProcessDetachTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTest", - methodName: "DetachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTest", - methodName: "DetachTestAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments/{agentId}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachTool.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachTool.g.cs deleted file mode 100644 index 6128b2f..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.DetachTool.g.cs +++ /dev/null @@ -1,367 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DetachToolSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DetachToolSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DetachToolSecurityRequirement0, - }; - partial void PrepareDetachToolArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref string toolId); - partial void PrepareDetachToolRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - string toolId); - partial void ProcessDetachToolResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Detach Tool
- /// Detach a tool from the agent. - ///
- /// - /// - /// 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 DetachToolAsync( - string id, - string toolId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDetachToolArguments( - httpClient: HttpClient, - id: ref id, - toolId: ref toolId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DetachToolSecurityRequirements, - operationName: "DetachToolAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/tools/{toolId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDetachToolRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - toolId: toolId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTool", - methodName: "DetachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTool", - methodName: "DetachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTool", - methodName: "DetachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.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); - ProcessDetachToolResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTool", - methodName: "DetachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DetachTool", - methodName: "DetachToolAsync", - pathTemplate: "$\"/v1/agents/{id}/tools/{toolId}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Get.g.cs deleted file mode 100644 index d81d93e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Get.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetSecurityRequirement0, - }; - partial void PrepareGetArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get
- /// Retrieve a voice agent by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetSecurityRequirements, - operationName: "GetAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.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); - ProcessGetResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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); - ProcessGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgent.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgent.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetDynamicVariables.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetDynamicVariables.g.cs deleted file mode 100644 index d753736..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetDynamicVariables.g.cs +++ /dev/null @@ -1,385 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetDynamicVariablesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetDynamicVariablesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetDynamicVariablesSecurityRequirement0, - }; - partial void PrepareGetDynamicVariablesArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetDynamicVariablesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetDynamicVariablesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetDynamicVariablesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Dynamic Variables
- /// Retrieve the agent's customer-scope dynamic variables and the read-only
- /// catalogue of reserved `system__*` keys. The system variables list is
- /// provided so editor UIs can render the reference list without maintaining
- /// a client-side copy of the catalogue. - ///
- /// - /// 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 GetDynamicVariablesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetDynamicVariablesArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetDynamicVariablesSecurityRequirements, - operationName: "GetDynamicVariablesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/variables", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetDynamicVariablesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDynamicVariables", - methodName: "GetDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDynamicVariables", - methodName: "GetDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDynamicVariables", - methodName: "GetDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.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); - ProcessGetDynamicVariablesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDynamicVariables", - methodName: "GetDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDynamicVariables", - methodName: "GetDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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); - ProcessGetDynamicVariablesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListDynamicVariablesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListDynamicVariablesResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetEvaluationConfig.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetEvaluationConfig.g.cs deleted file mode 100644 index d7ef323..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetEvaluationConfig.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetEvaluationConfigSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetEvaluationConfigSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetEvaluationConfigSecurityRequirement0, - }; - partial void PrepareGetEvaluationConfigArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetEvaluationConfigRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetEvaluationConfigResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetEvaluationConfigResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Evaluation Config
- /// Retrieve the agent's post-call evaluation criteria + data-collection config. - ///
- /// - /// 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 GetEvaluationConfigAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetEvaluationConfigArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetEvaluationConfigSecurityRequirements, - operationName: "GetEvaluationConfigAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/evaluation-config", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetEvaluationConfigRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetEvaluationConfig", - methodName: "GetEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetEvaluationConfig", - methodName: "GetEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetEvaluationConfig", - methodName: "GetEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.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); - ProcessGetEvaluationConfigResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetEvaluationConfig", - methodName: "GetEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetEvaluationConfig", - methodName: "GetEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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); - ProcessGetEvaluationConfigResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsEvaluationConfig.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsEvaluationConfig.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTest.g.cs deleted file mode 100644 index 9cf6224..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTest.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetTestSecurityRequirement0, - }; - partial void PrepareGetTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetTestResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Test
- /// Retrieve a test by ID. - ///
- /// - /// 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 GetTestAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetTestArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetTestSecurityRequirements, - operationName: "GetTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTest", - methodName: "GetTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTest", - methodName: "GetTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTest", - methodName: "GetTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.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); - ProcessGetTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTest", - methodName: "GetTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTest", - methodName: "GetTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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); - ProcessGetTestResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTest.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTest.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTestRun.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTestRun.g.cs deleted file mode 100644 index 00cdf08..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTestRun.g.cs +++ /dev/null @@ -1,384 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetTestRunSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetTestRunSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetTestRunSecurityRequirement0, - }; - partial void PrepareGetTestRunArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetTestRunRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetTestRunResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetTestRunResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Test Run
- /// Retrieve a single test run by ID. Poll this endpoint until
- /// `status` reaches a terminal state (`passed`, `failed`, or `error`).
- /// The `result` field is populated on terminal states. - ///
- /// - /// 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 GetTestRunAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetTestRunArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetTestRunSecurityRequirements, - operationName: "GetTestRunAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/test-runs/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetTestRunRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestRun", - methodName: "GetTestRunAsync", - pathTemplate: "$\"/v1/test-runs/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestRun", - methodName: "GetTestRunAsync", - pathTemplate: "$\"/v1/test-runs/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestRun", - methodName: "GetTestRunAsync", - pathTemplate: "$\"/v1/test-runs/{id}\"", - 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::Speechify.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); - ProcessGetTestRunResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestRun", - methodName: "GetTestRunAsync", - pathTemplate: "$\"/v1/test-runs/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestRun", - methodName: "GetTestRunAsync", - pathTemplate: "$\"/v1/test-runs/{id}\"", - 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); - ProcessGetTestRunResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTestRun.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTestRun.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTestStats.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTestStats.g.cs deleted file mode 100644 index 1dc962e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.GetTestStats.g.cs +++ /dev/null @@ -1,388 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetTestStatsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetTestStatsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetTestStatsSecurityRequirement0, - }; - partial void PrepareGetTestStatsArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? windowDays); - partial void PrepareGetTestStatsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? windowDays); - partial void ProcessGetTestStatsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetTestStatsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Test Stats
- /// Aggregate pass-rate metrics over the last N days. Returns dense
- /// daily buckets (one entry per day, zero-filled) plus totals and a
- /// per-type breakdown. Powers the header chart on the global tests
- /// page. Default window is 30 days, max 90. - ///
- /// - /// 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 GetTestStatsAsync( - int? windowDays = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetTestStatsArguments( - httpClient: HttpClient, - windowDays: ref windowDays); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetTestStatsSecurityRequirements, - operationName: "GetTestStatsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tests/stats", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("window_days", windowDays?.ToString()) - ; - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetTestStatsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - windowDays: windowDays); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestStats", - methodName: "GetTestStatsAsync", - pathTemplate: "\"/v1/tests/stats\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestStats", - methodName: "GetTestStatsAsync", - pathTemplate: "\"/v1/tests/stats\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestStats", - methodName: "GetTestStatsAsync", - pathTemplate: "\"/v1/tests/stats\"", - 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::Speechify.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); - ProcessGetTestStatsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestStats", - methodName: "GetTestStatsAsync", - pathTemplate: "\"/v1/tests/stats\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetTestStats", - methodName: "GetTestStatsAsync", - pathTemplate: "\"/v1/tests/stats\"", - 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); - ProcessGetTestStatsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTestStats.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTestStats.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.List.g.cs deleted file mode 100644 index 2af5f11..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.List.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List voice agents owned by the caller. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/agents", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/agents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/agents\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListAgentsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListAgentsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListAgentKnowledgeBases.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListAgentKnowledgeBases.g.cs deleted file mode 100644 index 185bcc7..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListAgentKnowledgeBases.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListAgentKnowledgeBasesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListAgentKnowledgeBasesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListAgentKnowledgeBasesSecurityRequirement0, - }; - partial void PrepareListAgentKnowledgeBasesArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListAgentKnowledgeBasesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListAgentKnowledgeBasesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListAgentKnowledgeBasesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Agent Knowledge Bases
- /// List knowledge bases attached to an agent. - ///
- /// - /// 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 ListAgentKnowledgeBasesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListAgentKnowledgeBasesArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListAgentKnowledgeBasesSecurityRequirements, - operationName: "ListAgentKnowledgeBasesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/knowledge-bases", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListAgentKnowledgeBasesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAgentKnowledgeBases", - methodName: "ListAgentKnowledgeBasesAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAgentKnowledgeBases", - methodName: "ListAgentKnowledgeBasesAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAgentKnowledgeBases", - methodName: "ListAgentKnowledgeBasesAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases\"", - 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::Speechify.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); - ProcessListAgentKnowledgeBasesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAgentKnowledgeBases", - methodName: "ListAgentKnowledgeBasesAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAgentKnowledgeBases", - methodName: "ListAgentKnowledgeBasesAsync", - pathTemplate: "$\"/v1/agents/{id}/knowledge-bases\"", - 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); - ProcessListAgentKnowledgeBasesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListKnowledgeBasesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListKnowledgeBasesResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListAllTests.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListAllTests.g.cs deleted file mode 100644 index d8a4ed0..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListAllTests.g.cs +++ /dev/null @@ -1,438 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListAllTestsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListAllTestsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListAllTestsSecurityRequirement0, - }; - partial void PrepareListAllTestsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? agentId, - ref string? type, - ref string? status, - ref string? folderId, - ref string? updatedAfter, - ref string? q, - ref int? limit, - ref string? cursor); - partial void PrepareListAllTestsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? agentId, - string? type, - string? status, - string? folderId, - string? updatedAfter, - string? q, - int? limit, - string? cursor); - partial void ProcessListAllTestsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListAllTestsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List All Tests
- /// Workspace-wide list of tests across every agent the caller owns.
- /// Supports filters (agent, type, last-run status, folder), full-text
- /// search on name/description, and cursor pagination. Each row carries
- /// its newest run and attached agent IDs so the list renders without
- /// N+1 round-trips. - ///
- /// - /// - /// - /// - /// - /// - /// - /// - /// 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 ListAllTestsAsync( - string? agentId = default, - string? type = default, - string? status = default, - string? folderId = default, - string? updatedAfter = default, - string? q = default, - int? limit = default, - string? cursor = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListAllTestsArguments( - httpClient: HttpClient, - agentId: ref agentId, - type: ref type, - status: ref status, - folderId: ref folderId, - updatedAfter: ref updatedAfter, - q: ref q, - limit: ref limit, - cursor: ref cursor); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListAllTestsSecurityRequirements, - operationName: "ListAllTestsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tests", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("agent_id", agentId) - .AddOptionalParameter("type", type) - .AddOptionalParameter("status", status) - .AddOptionalParameter("folder_id", folderId) - .AddOptionalParameter("updated_after", updatedAfter) - .AddOptionalParameter("q", q) - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("cursor", cursor) - ; - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListAllTestsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - agentId: agentId, - type: type, - status: status, - folderId: folderId, - updatedAfter: updatedAfter, - q: q, - limit: limit, - cursor: cursor); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAllTests", - methodName: "ListAllTestsAsync", - pathTemplate: "\"/v1/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAllTests", - methodName: "ListAllTestsAsync", - pathTemplate: "\"/v1/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAllTests", - methodName: "ListAllTestsAsync", - pathTemplate: "\"/v1/tests\"", - 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::Speechify.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); - ProcessListAllTestsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAllTests", - methodName: "ListAllTestsAsync", - pathTemplate: "\"/v1/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAllTests", - methodName: "ListAllTestsAsync", - pathTemplate: "\"/v1/tests\"", - 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); - ProcessListAllTestsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListTestsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListTestsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListMemories.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListMemories.g.cs deleted file mode 100644 index 02217b3..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListMemories.g.cs +++ /dev/null @@ -1,404 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListMemoriesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListMemoriesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListMemoriesSecurityRequirement0, - }; - partial void PrepareListMemoriesArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - ref int? limit, - ref int? offset); - partial void PrepareListMemoriesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - int? limit, - int? offset); - partial void ProcessListMemoriesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListMemoriesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Memories
- /// List per-caller memories extracted for an agent. Memories are
- /// written post-call by the built-in extractor when `memory_enabled`
- /// is true on the agent; the list is sorted newest-first. - ///
- /// - /// - /// Default Value: 100 - /// - /// - /// Default Value: 0 - /// - /// 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 ListMemoriesAsync( - string id, - int? limit = default, - int? offset = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListMemoriesArguments( - httpClient: HttpClient, - id: ref id, - limit: ref limit, - offset: ref offset); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListMemoriesSecurityRequirements, - operationName: "ListMemoriesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/memories", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) - ; - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListMemoriesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - limit: limit, - offset: offset); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/agents/{id}/memories\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/agents/{id}/memories\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/agents/{id}/memories\"", - 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::Speechify.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); - ProcessListMemoriesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/agents/{id}/memories\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/agents/{id}/memories\"", - 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); - ProcessListMemoriesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListMemoriesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListMemoriesResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestAttachments.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestAttachments.g.cs deleted file mode 100644 index 9ba1735..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestAttachments.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListTestAttachmentsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListTestAttachmentsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListTestAttachmentsSecurityRequirement0, - }; - partial void PrepareListTestAttachmentsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListTestAttachmentsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListTestAttachmentsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListTestAttachmentsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Test Attachments
- /// List every agent a test is attached to. - ///
- /// - /// 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 ListTestAttachmentsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListTestAttachmentsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListTestAttachmentsSecurityRequirements, - operationName: "ListTestAttachmentsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}/attachments", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListTestAttachmentsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestAttachments", - methodName: "ListTestAttachmentsAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestAttachments", - methodName: "ListTestAttachmentsAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestAttachments", - methodName: "ListTestAttachmentsAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments\"", - 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::Speechify.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); - ProcessListTestAttachmentsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestAttachments", - methodName: "ListTestAttachmentsAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestAttachments", - methodName: "ListTestAttachmentsAsync", - pathTemplate: "$\"/v1/tests/{id}/attachments\"", - 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); - ProcessListTestAttachmentsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListAgentTestAttachmentsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListAgentTestAttachmentsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestFolders.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestFolders.g.cs deleted file mode 100644 index b1e7e0b..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestFolders.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListTestFoldersSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListTestFoldersSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListTestFoldersSecurityRequirement0, - }; - partial void PrepareListTestFoldersArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListTestFoldersRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListTestFoldersResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListTestFoldersResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Test Folders
- /// List every test folder the caller owns. Flat list; build the tree client-side. - ///
- /// 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 ListTestFoldersAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListTestFoldersArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListTestFoldersSecurityRequirements, - operationName: "ListTestFoldersAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/test-folders", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListTestFoldersRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestFolders", - methodName: "ListTestFoldersAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestFolders", - methodName: "ListTestFoldersAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestFolders", - methodName: "ListTestFoldersAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.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); - ProcessListTestFoldersResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestFolders", - methodName: "ListTestFoldersAsync", - pathTemplate: "\"/v1/test-folders\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestFolders", - methodName: "ListTestFoldersAsync", - pathTemplate: "\"/v1/test-folders\"", - 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); - ProcessListTestFoldersResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListAgentTestFoldersResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListAgentTestFoldersResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestRuns.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestRuns.g.cs deleted file mode 100644 index 32dc53c..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTestRuns.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListTestRunsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListTestRunsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListTestRunsSecurityRequirement0, - }; - partial void PrepareListTestRunsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListTestRunsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListTestRunsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListTestRunsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Test Runs
- /// List the run history for a test, newest first. - ///
- /// - /// 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 ListTestRunsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListTestRunsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListTestRunsSecurityRequirements, - operationName: "ListTestRunsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}/runs", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListTestRunsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestRuns", - methodName: "ListTestRunsAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestRuns", - methodName: "ListTestRunsAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestRuns", - methodName: "ListTestRunsAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.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); - ProcessListTestRunsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestRuns", - methodName: "ListTestRunsAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTestRuns", - methodName: "ListTestRunsAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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); - ProcessListTestRunsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListAgentTestRunsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListAgentTestRunsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTests.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTests.g.cs deleted file mode 100644 index 0c70147..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTests.g.cs +++ /dev/null @@ -1,384 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListTestsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListTestsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListTestsSecurityRequirement0, - }; - partial void PrepareListTestsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListTestsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListTestsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListTestsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Tests
- /// List all tests configured for the agent. Each entry includes the
- /// most recent run so the console can render pass/fail badges without
- /// an extra round-trip. - ///
- /// - /// 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 ListTestsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListTestsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListTestsSecurityRequirements, - operationName: "ListTestsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/tests", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListTestsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTests", - methodName: "ListTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTests", - methodName: "ListTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTests", - methodName: "ListTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.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); - ProcessListTestsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTests", - methodName: "ListTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTests", - methodName: "ListTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests\"", - 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); - ProcessListTestsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListAgentTestsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListAgentTestsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTools.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTools.g.cs deleted file mode 100644 index fbd68b2..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.ListTools.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListToolsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListToolsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListToolsSecurityRequirement0, - }; - partial void PrepareListToolsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListToolsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListToolsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListToolsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Tools
- /// List tools currently attached to the agent. - ///
- /// - /// 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 ListToolsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListToolsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListToolsSecurityRequirements, - operationName: "ListToolsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/tools", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListToolsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTools", - methodName: "ListToolsAsync", - pathTemplate: "$\"/v1/agents/{id}/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTools", - methodName: "ListToolsAsync", - pathTemplate: "$\"/v1/agents/{id}/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTools", - methodName: "ListToolsAsync", - pathTemplate: "$\"/v1/agents/{id}/tools\"", - 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::Speechify.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); - ProcessListToolsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTools", - methodName: "ListToolsAsync", - pathTemplate: "$\"/v1/agents/{id}/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListTools", - methodName: "ListToolsAsync", - pathTemplate: "$\"/v1/agents/{id}/tools\"", - 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); - ProcessListToolsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListToolsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListToolsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.MoveTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.MoveTest.g.cs deleted file mode 100644 index 7aefc3e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.MoveTest.g.cs +++ /dev/null @@ -1,402 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_MoveTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_MoveTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_MoveTestSecurityRequirement0, - }; - partial void PrepareMoveTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsMoveAgentTestRequest request); - partial void PrepareMoveTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsMoveAgentTestRequest request); - partial void ProcessMoveTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Move Test
- /// Move a test into a folder. Pass `folder_id: null` for root. - ///
- /// - /// - /// 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 MoveTestAsync( - string id, - - global::Speechify.TtsMoveAgentTestRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareMoveTestArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_MoveTestSecurityRequirements, - operationName: "MoveTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}/move", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareMoveTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "MoveTest", - methodName: "MoveTestAsync", - pathTemplate: "$\"/v1/tests/{id}/move\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "MoveTest", - methodName: "MoveTestAsync", - pathTemplate: "$\"/v1/tests/{id}/move\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "MoveTest", - methodName: "MoveTestAsync", - pathTemplate: "$\"/v1/tests/{id}/move\"", - 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::Speechify.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); - ProcessMoveTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "MoveTest", - methodName: "MoveTestAsync", - pathTemplate: "$\"/v1/tests/{id}/move\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "MoveTest", - methodName: "MoveTestAsync", - pathTemplate: "$\"/v1/tests/{id}/move\"", - 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); - - try - { - __response.EnsureSuccessStatusCode(); - - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.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(); - } - } - /// - /// Move Test
- /// Move a test into a folder. Pass `folder_id: null` for root. - ///
- /// - /// - /// 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 MoveTestAsync( - string id, - string? folderId = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsMoveAgentTestRequest - { - FolderId = folderId, - }; - - await MoveTestAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunAllTests.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunAllTests.g.cs deleted file mode 100644 index 5f8c4d0..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunAllTests.g.cs +++ /dev/null @@ -1,385 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_RunAllTestsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_RunAllTestsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_RunAllTestsSecurityRequirement0, - }; - partial void PrepareRunAllTestsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareRunAllTestsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessRunAllTestsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessRunAllTestsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Run All Tests
- /// Enqueue runs for every test on the agent concurrently. Up to 50
- /// tests are dispatched in one call. Each returned run starts in
- /// `queued` status; poll `GET /v1/test-runs/{id}` for the terminal
- /// result. - ///
- /// - /// 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 RunAllTestsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareRunAllTestsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_RunAllTestsSecurityRequirements, - operationName: "RunAllTestsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/tests/runs", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareRunAllTestsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunAllTests", - methodName: "RunAllTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunAllTests", - methodName: "RunAllTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunAllTests", - methodName: "RunAllTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests/runs\"", - 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::Speechify.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); - ProcessRunAllTestsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunAllTests", - methodName: "RunAllTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunAllTests", - methodName: "RunAllTestsAsync", - pathTemplate: "$\"/v1/agents/{id}/tests/runs\"", - 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); - ProcessRunAllTestsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsRunAgentTestsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsRunAgentTestsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunTest.g.cs deleted file mode 100644 index e22024e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunTest.g.cs +++ /dev/null @@ -1,384 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_RunTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_RunTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_RunTestSecurityRequirement0, - }; - partial void PrepareRunTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareRunTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessRunTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessRunTestResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Run Test
- /// Enqueue a single run of the test. The returned run starts in
- /// `queued` status. Poll `GET /v1/test-runs/{id}` until the status
- /// reaches a terminal state (`passed`, `failed`, or `error`). - ///
- /// - /// 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 RunTestAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareRunTestArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_RunTestSecurityRequirements, - operationName: "RunTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}/runs", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareRunTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTest", - methodName: "RunTestAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTest", - methodName: "RunTestAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTest", - methodName: "RunTestAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.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); - ProcessRunTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTest", - methodName: "RunTestAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTest", - methodName: "RunTestAsync", - pathTemplate: "$\"/v1/tests/{id}/runs\"", - 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); - ProcessRunTestResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTestRun.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTestRun.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunTestsBatch.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunTestsBatch.g.cs deleted file mode 100644 index 3a2030c..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.RunTestsBatch.g.cs +++ /dev/null @@ -1,422 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_RunTestsBatchSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_RunTestsBatchSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_RunTestsBatchSecurityRequirement0, - }; - partial void PrepareRunTestsBatchArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsRunBatchRequest request); - partial void PrepareRunTestsBatchRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsRunBatchRequest request); - partial void ProcessRunTestsBatchResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessRunTestsBatchResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Run Tests Batch
- /// Queue runs for every (test, agent) pair in the body. Entries
- /// without an `agent_id` fan out to every agent the test is
- /// attached to. Total expanded runs are capped at 100 per call.
- /// Each entry in the response is a queued run; poll
- /// `GET /v1/test-runs/{id}` for each. - ///
- /// - /// 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 RunTestsBatchAsync( - - global::Speechify.TtsRunBatchRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareRunTestsBatchArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_RunTestsBatchSecurityRequirements, - operationName: "RunTestsBatchAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tests/runs:batch", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareRunTestsBatchRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTestsBatch", - methodName: "RunTestsBatchAsync", - pathTemplate: "\"/v1/tests/runs:batch\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTestsBatch", - methodName: "RunTestsBatchAsync", - pathTemplate: "\"/v1/tests/runs:batch\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTestsBatch", - methodName: "RunTestsBatchAsync", - pathTemplate: "\"/v1/tests/runs:batch\"", - 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::Speechify.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); - ProcessRunTestsBatchResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTestsBatch", - methodName: "RunTestsBatchAsync", - pathTemplate: "\"/v1/tests/runs:batch\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RunTestsBatch", - methodName: "RunTestsBatchAsync", - pathTemplate: "\"/v1/tests/runs:batch\"", - 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); - ProcessRunTestsBatchResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsRunBatchResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsRunBatchResponse.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::Speechify.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(); - } - } - /// - /// Run Tests Batch
- /// Queue runs for every (test, agent) pair in the body. Entries
- /// without an `agent_id` fan out to every agent the test is
- /// attached to. Total expanded runs are capped at 100 per call.
- /// Each entry in the response is a queued run; poll
- /// `GET /v1/test-runs/{id}` for each. - ///
- /// - /// 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 RunTestsBatchAsync( - global::System.Collections.Generic.IList entries, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsRunBatchRequest - { - Entries = entries, - }; - - return await RunTestsBatchAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Update.g.cs deleted file mode 100644 index 66d3bb9..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.Update.g.cs +++ /dev/null @@ -1,463 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateSecurityRequirement0, - }; - partial void PrepareUpdateArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateAgentRequest request); - partial void PrepareUpdateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateAgentRequest request); - partial void ProcessUpdateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update
- /// Update a voice agent. Only fields present on the request body are changed. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - - global::Speechify.TtsUpdateAgentRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateSecurityRequirements, - operationName: "UpdateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.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); - ProcessUpdateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/agents/{id}\"", - 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); - ProcessUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgent.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgent.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update
- /// Update a voice agent. Only fields present on the request body are changed. - ///
- /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// When supplied, replaces the stored list. Pass an empty
- /// array to clear enforcement (public agent is open again).
- /// Omit the field to leave the existing value unchanged. - /// - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - string? name = default, - string? prompt = default, - string? firstMessage = default, - string? language = default, - string? llmModel = default, - string? voiceId = default, - double? temperature = default, - object? config = default, - bool? isPublic = default, - global::System.Collections.Generic.IList? allowedOrigins = default, - global::System.Collections.Generic.IList? hostnameAllowlist = default, - bool? memoryEnabled = default, - int? memoryRetentionDays = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateAgentRequest - { - Name = name, - Prompt = prompt, - FirstMessage = firstMessage, - Language = language, - LlmModel = llmModel, - VoiceId = voiceId, - Temperature = temperature, - Config = config, - IsPublic = isPublic, - AllowedOrigins = allowedOrigins, - HostnameAllowlist = hostnameAllowlist, - MemoryEnabled = memoryEnabled, - MemoryRetentionDays = memoryRetentionDays, - }; - - return await UpdateAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateDynamicVariables.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateDynamicVariables.g.cs deleted file mode 100644 index 0edad7d..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateDynamicVariables.g.cs +++ /dev/null @@ -1,435 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateDynamicVariablesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateDynamicVariablesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateDynamicVariablesSecurityRequirement0, - }; - partial void PrepareUpdateDynamicVariablesArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateDynamicVariablesRequest request); - partial void PrepareUpdateDynamicVariablesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateDynamicVariablesRequest request); - partial void ProcessUpdateDynamicVariablesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateDynamicVariablesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Dynamic Variables
- /// Replace the agent's customer-scope dynamic variable definitions.
- /// The supplied list overwrites the stored list wholesale (same
- /// semantics as `updateEvaluationConfig`). Pass an empty array to
- /// clear all variables. Up to 20 variables per agent. Keys must
- /// match `[a-zA-Z0-9_]+` and must not start with the reserved
- /// `system__` prefix. - ///
- /// - /// - /// 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 UpdateDynamicVariablesAsync( - string id, - - global::Speechify.TtsUpdateDynamicVariablesRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateDynamicVariablesArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateDynamicVariablesSecurityRequirements, - operationName: "UpdateDynamicVariablesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/variables", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateDynamicVariablesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateDynamicVariables", - methodName: "UpdateDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateDynamicVariables", - methodName: "UpdateDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateDynamicVariables", - methodName: "UpdateDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.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); - ProcessUpdateDynamicVariablesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateDynamicVariables", - methodName: "UpdateDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateDynamicVariables", - methodName: "UpdateDynamicVariablesAsync", - pathTemplate: "$\"/v1/agents/{id}/variables\"", - 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); - ProcessUpdateDynamicVariablesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListDynamicVariablesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListDynamicVariablesResponse.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update Dynamic Variables
- /// Replace the agent's customer-scope dynamic variable definitions.
- /// The supplied list overwrites the stored list wholesale (same
- /// semantics as `updateEvaluationConfig`). Pass an empty array to
- /// clear all variables. Up to 20 variables per agent. Keys must
- /// match `[a-zA-Z0-9_]+` and must not start with the reserved
- /// `system__` prefix. - ///
- /// - /// - /// The new variable list. Replaces the existing list entirely. - /// - /// 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 UpdateDynamicVariablesAsync( - string id, - global::System.Collections.Generic.IList variables, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateDynamicVariablesRequest - { - Variables = variables, - }; - - return await UpdateDynamicVariablesAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateEvaluationConfig.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateEvaluationConfig.g.cs deleted file mode 100644 index 559b598..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateEvaluationConfig.g.cs +++ /dev/null @@ -1,426 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateEvaluationConfigSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateEvaluationConfigSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateEvaluationConfigSecurityRequirement0, - }; - partial void PrepareUpdateEvaluationConfigArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateEvaluationConfigRequest request); - partial void PrepareUpdateEvaluationConfigRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateEvaluationConfigRequest request); - partial void ProcessUpdateEvaluationConfigResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateEvaluationConfigResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Evaluation Config
- /// Replace the agent's evaluation criteria + data-collection fields. - ///
- /// - /// - /// 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 UpdateEvaluationConfigAsync( - string id, - - global::Speechify.TtsUpdateEvaluationConfigRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateEvaluationConfigArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateEvaluationConfigSecurityRequirements, - operationName: "UpdateEvaluationConfigAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/agents/{id}/evaluation-config", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateEvaluationConfigRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateEvaluationConfig", - methodName: "UpdateEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateEvaluationConfig", - methodName: "UpdateEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateEvaluationConfig", - methodName: "UpdateEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.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); - ProcessUpdateEvaluationConfigResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateEvaluationConfig", - methodName: "UpdateEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateEvaluationConfig", - methodName: "UpdateEvaluationConfigAsync", - pathTemplate: "$\"/v1/agents/{id}/evaluation-config\"", - 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); - ProcessUpdateEvaluationConfigResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsEvaluationConfig.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsEvaluationConfig.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update Evaluation Config
- /// Replace the agent's evaluation criteria + data-collection fields. - ///
- /// - /// - /// - /// 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 UpdateEvaluationConfigAsync( - string id, - global::System.Collections.Generic.IList criteria, - global::System.Collections.Generic.IList dataCollection, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateEvaluationConfigRequest - { - Criteria = criteria, - DataCollection = dataCollection, - }; - - return await UpdateEvaluationConfigAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateTest.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateTest.g.cs deleted file mode 100644 index e4aec0e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateTest.g.cs +++ /dev/null @@ -1,436 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateTestSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateTestSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateTestSecurityRequirement0, - }; - partial void PrepareUpdateTestArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateAgentTestRequest request); - partial void PrepareUpdateTestRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateAgentTestRequest request); - partial void ProcessUpdateTestResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateTestResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Test
- /// Update a test. Only fields present on the request body are changed. - ///
- /// - /// - /// 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 UpdateTestAsync( - string id, - - global::Speechify.TtsUpdateAgentTestRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateTestArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateTestSecurityRequirements, - operationName: "UpdateTestAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tests/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateTestRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTest", - methodName: "UpdateTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTest", - methodName: "UpdateTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTest", - methodName: "UpdateTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.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); - ProcessUpdateTestResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTest", - methodName: "UpdateTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTest", - methodName: "UpdateTestAsync", - pathTemplate: "$\"/v1/tests/{id}\"", - 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); - ProcessUpdateTestResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTest.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTest.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update Test
- /// Update a test. Only fields present on the request body are changed. - ///
- /// - /// - /// - /// - /// Replaces the test config when present. - /// - /// - /// Replaces the tool-mock config when present. - /// - /// 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 UpdateTestAsync( - string id, - string? name = default, - string? description = default, - global::Speechify.TtsUpdateAgentTestRequestConfig? config = default, - global::Speechify.TtsToolMockConfig? toolMockConfig = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateAgentTestRequest - { - Name = name, - Description = description, - Config = config, - ToolMockConfig = toolMockConfig, - }; - - return await UpdateTestAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateTestFolder.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateTestFolder.g.cs deleted file mode 100644 index 27b924b..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.UpdateTestFolder.g.cs +++ /dev/null @@ -1,426 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAgentsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateTestFolderSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateTestFolderSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateTestFolderSecurityRequirement0, - }; - partial void PrepareUpdateTestFolderArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateAgentTestFolderRequest request); - partial void PrepareUpdateTestFolderRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateAgentTestFolderRequest request); - partial void ProcessUpdateTestFolderResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateTestFolderResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Test Folder
- /// Rename or reparent a test folder. Cycles are rejected. - ///
- /// - /// - /// 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 UpdateTestFolderAsync( - string id, - - global::Speechify.TtsUpdateAgentTestFolderRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateTestFolderArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateTestFolderSecurityRequirements, - operationName: "UpdateTestFolderAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/test-folders/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateTestFolderRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTestFolder", - methodName: "UpdateTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTestFolder", - methodName: "UpdateTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTestFolder", - methodName: "UpdateTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.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); - ProcessUpdateTestFolderResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTestFolder", - methodName: "UpdateTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateTestFolder", - methodName: "UpdateTestFolderAsync", - pathTemplate: "$\"/v1/test-folders/{id}\"", - 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); - ProcessUpdateTestFolderResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAgentTestFolder.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAgentTestFolder.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update Test Folder
- /// Rename or reparent a test folder. Cycles are rejected. - ///
- /// - /// - /// - /// 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 UpdateTestFolderAsync( - string id, - string? name = default, - string? parentFolderId = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateAgentTestFolderRequest - { - Name = name, - ParentFolderId = parentFolderId, - }; - - return await UpdateTestFolderAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.g.cs deleted file mode 100644 index 4b99de7..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAgentsClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsAgentsClient : global::Speechify.ISubpackageTtsSubpackageTtsAgentsClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsAgentsClient. - /// 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 SubpackageTtsSubpackageTtsAgentsClient( - 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 SubpackageTtsSubpackageTtsAgentsClient. - /// 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 SubpackageTtsSubpackageTtsAgentsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Speech.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Speech.g.cs index eba8aab..d01b8f0 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Speech.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Speech.g.cs @@ -42,8 +42,10 @@ partial void ProcessSpeechResponseContent( ref string content); /// - /// Speech
- /// Gets the speech data for the given input + /// Create Speech
+ /// Synthesize speech audio from text or SSML. Returns the complete audio
+ /// file plus billing and speech-mark metadata in a single response. For
+ /// low-latency playback or long-form text, use POST /v1/audio/stream. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -51,6 +53,31 @@ partial void ProcessSpeechResponseContent( /// public async global::System.Threading.Tasks.Task SpeechAsync( + global::Speechify.TtsGetSpeechRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SpeechAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Speech
+ /// Synthesize speech audio from text or SSML. Returns the complete audio
+ /// file plus billing and speech-mark metadata in a single response. For
+ /// low-latency playback or long-form text, use POST /v1/audio/stream. + ///
+ /// + /// 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> SpeechAsResponseAsync( + global::Speechify.TtsGetSpeechRequest request, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +112,7 @@ partial void ProcessSpeechResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Speechify.PathBuilder( path: "/v1/audio/speech", baseUri: HttpClient.BaseAddress); @@ -164,6 +192,8 @@ partial void ProcessSpeechResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +204,11 @@ partial void ProcessSpeechResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +226,8 @@ partial void ProcessSpeechResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +237,7 @@ partial void ProcessSpeechResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +246,11 @@ partial void ProcessSpeechResponseContent( __attempt < __maxAttempts && global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +267,15 @@ partial void ProcessSpeechResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +315,8 @@ partial void ProcessSpeechResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,8 +337,195 @@ partial void ProcessSpeechResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.TtsError? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.TtsError? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.TtsError.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.TtsError.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -317,23 +548,25 @@ partial void ProcessSpeechResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Speechify.TtsGetSpeechResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Speechify.TtsGetSpeechResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -347,9 +580,13 @@ partial void ProcessSpeechResponseContent( #endif ).ConfigureAwait(false); - return - await global::Speechify.TtsGetSpeechResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Speechify.TtsGetSpeechResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -366,17 +603,15 @@ partial void ProcessSpeechResponseContent( { } - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -388,8 +623,10 @@ partial void ProcessSpeechResponseContent( } } /// - /// Speech
- /// Gets the speech data for the given input + /// Create Speech
+ /// Synthesize speech audio from text or SSML. Returns the complete audio
+ /// file plus billing and speech-mark metadata in a single response. For
+ /// low-latency playback or long-form text, use POST /v1/audio/stream. ///
/// /// The format for the output audio. Note, that the current default is "wav", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect.
@@ -405,7 +642,7 @@ partial void ProcessSpeechResponseContent( /// Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. /// /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english /// /// diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Stream.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Stream.g.cs index 04c9cf9..63ebac7 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Stream.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.Stream.g.cs @@ -41,18 +41,50 @@ partial void ProcessStreamResponse( partial void ProcessStreamResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); + ref byte[] content); /// - /// Stream
- /// Gets the stream speech for the given input + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. ///
/// /// /// 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 StreamAsync( + public async global::System.Threading.Tasks.Task StreamAsync( + global::Speechify.TtsV1AudioStreamPostParametersAccept accept, + + global::Speechify.TtsGetStreamRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamAsResponseAsync( + accept: accept, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. + ///
+ /// + /// + /// 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 StreamAsStreamAsync( global::Speechify.TtsV1AudioStreamPostParametersAccept accept, global::Speechify.TtsGetStreamRequest request, @@ -90,6 +122,7 @@ partial void ProcessStreamResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Speechify.PathBuilder( path: "/v1/audio/stream", baseUri: HttpClient.BaseAddress); @@ -173,16 +206,23 @@ partial void ProcessStreamResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { __response = await HttpClient.SendAsync( request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +240,8 @@ partial void ProcessStreamResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +251,7 @@ partial void ProcessStreamResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +260,11 @@ partial void ProcessStreamResponseContent( __attempt < __maxAttempts && global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +281,534 @@ partial void ProcessStreamResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + try + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessStreamResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Stream", + methodName: "StreamAsync", + pathTemplate: "\"/v1/audio/stream\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Stream", + methodName: "StreamAsync", + pathTemplate: "\"/v1/audio/stream\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.TtsError? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.TtsError? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.TtsError.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.TtsError.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Speechify.ResponseStream(__response, __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + } + catch + { + __response.Dispose(); + throw; + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. + ///
+ /// + /// + /// 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> StreamAsResponseAsync( + global::Speechify.TtsV1AudioStreamPostParametersAccept accept, + + global::Speechify.TtsGetStreamRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareStreamArguments( + httpClient: HttpClient, + accept: ref accept, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_StreamSecurityRequirements, + operationName: "StreamAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: "/v1/audio/stream", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Speechify.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); + } + } + + __httpRequest.Headers.TryAddWithoutValidation("Accept", accept.ToValueString()); + + 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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareStreamRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + accept: accept!, + 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Stream", + methodName: "StreamAsync", + pathTemplate: "\"/v1/audio/stream\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( clientOptions: Options, requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Stream", + methodName: "StreamAsync", + pathTemplate: "\"/v1/audio/stream\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Stream", + methodName: "StreamAsync", + pathTemplate: "\"/v1/audio/stream\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +848,8 @@ partial void ProcessStreamResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,21 +870,204 @@ partial void ProcessStreamResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.TtsError? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.TtsError? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.TtsError.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.TtsError.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { - var __content = await __response.Content.ReadAsStringAsync( + var __content = await __response.Content.ReadAsByteArrayAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); ProcessStreamResponseContent( httpClient: HttpClient, httpResponseMessage: __response, @@ -326,23 +1077,23 @@ partial void ProcessStreamResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Speechify.TtsAudioStreamResponse200.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { - throw new global::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: null, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -350,15 +1101,17 @@ partial void ProcessStreamResponseContent( try { __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( + var __content = await __response.Content.ReadAsByteArrayAsync( #if NET5_0_OR_GREATER __effectiveCancellationToken #endif ).ConfigureAwait(false); - return - await global::Speechify.TtsAudioStreamResponse200.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -375,17 +1128,15 @@ partial void ProcessStreamResponseContent( { } - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -397,8 +1148,11 @@ partial void ProcessStreamResponseContent( } } /// - /// Stream
- /// Gets the stream speech for the given input + /// Stream Speech
+ /// Synthesize speech and stream the audio back as it is generated, for
+ /// low-latency playback. The Accept header selects the audio container.
+ /// For short text where receiving the whole file at once is fine, use
+ /// POST /v1/audio/speech. ///
/// /// @@ -411,7 +1165,7 @@ partial void ProcessStreamResponseContent( /// Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support. /// /// - /// Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.
+ /// Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.
/// Default Value: simba-english /// /// @@ -423,7 +1177,7 @@ partial void ProcessStreamResponseContent( /// 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 StreamAsync( + public async global::System.Threading.Tasks.Task StreamAsync( global::Speechify.TtsV1AudioStreamPostParametersAccept accept, string input, string voiceId, diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.g.cs index 8157968..426cef3 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAudioClient.g.cs @@ -61,6 +61,27 @@ public SubpackageTtsSubpackageTtsAudioClient( { } + /// + /// Creates a new instance of the SubpackageTtsSubpackageTtsAudioClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SubpackageTtsSubpackageTtsAudioClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + /// /// Creates a new instance of the SubpackageTtsSubpackageTtsAudioClient. /// If no httpClient is provided, a new one will be created. @@ -72,10 +93,10 @@ public SubpackageTtsSubpackageTtsAudioClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SubpackageTtsSubpackageTtsAudioClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAuthClient.CreateAccessToken.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAuthClient.CreateAccessToken.g.cs deleted file mode 100644 index ba12e77..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAuthClient.CreateAccessToken.g.cs +++ /dev/null @@ -1,460 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsAuthClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateAccessTokenSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateAccessTokenSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateAccessTokenSecurityRequirement0, - }; - partial void PrepareCreateAccessTokenArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateAccessTokenRequest request); - partial void PrepareCreateAccessTokenRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateAccessTokenRequest request); - partial void ProcessCreateAccessTokenResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateAccessTokenResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Access Token
- /// WARNING: This endpoint is deprecated. Create a new API token for the logged in user. - ///
- /// - /// 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 CreateAccessTokenAsync( - - global::Speechify.TtsCreateAccessTokenRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateAccessTokenArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateAccessTokenSecurityRequirements, - operationName: "CreateAccessTokenAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/auth/token", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateAccessTokenRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateAccessToken", - methodName: "CreateAccessTokenAsync", - pathTemplate: "\"/v1/auth/token\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateAccessToken", - methodName: "CreateAccessTokenAsync", - pathTemplate: "\"/v1/auth/token\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateAccessToken", - methodName: "CreateAccessTokenAsync", - pathTemplate: "\"/v1/auth/token\"", - 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::Speechify.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); - ProcessCreateAccessTokenResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateAccessToken", - methodName: "CreateAccessTokenAsync", - pathTemplate: "\"/v1/auth/token\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateAccessToken", - methodName: "CreateAccessTokenAsync", - pathTemplate: "\"/v1/auth/token\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - // Contains the details of the error - if ((int)__response.StatusCode == 400) - { - string? __content_400 = null; - global::System.Exception? __exception_400 = null; - global::Speechify.TtsOAuthError? __value_400 = null; - try - { - if (__effectiveReadResponseAsString) - { - __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_400 = global::Speechify.TtsOAuthError.FromJson(__content_400, JsonSerializerContext); - } - else - { - __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - - __value_400 = global::Speechify.TtsOAuthError.FromJson(__content_400, JsonSerializerContext); - } - } - catch (global::System.Exception __ex) - { - __exception_400 = __ex; - } - - throw new global::Speechify.ApiException( - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, - innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - 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); - ProcessCreateAccessTokenResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsAccessToken.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsAccessToken.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create Access Token
- /// WARNING: This endpoint is deprecated. Create a new API token for the logged in user. - ///
- /// - /// in: body - /// - /// - /// The scope, or a space-delimited list of scopes the token is requested for
- /// in: body - /// - /// 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 CreateAccessTokenAsync( - global::Speechify.TtsCreateAccessTokenRequestGrantType grantType = default, - global::Speechify.TtsCreateAccessTokenRequestScope? scope = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateAccessTokenRequest - { - GrantType = grantType, - Scope = scope, - }; - - return await CreateAccessTokenAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAuthClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAuthClient.g.cs deleted file mode 100644 index c15de55..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsAuthClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsAuthClient : global::Speechify.ISubpackageTtsSubpackageTtsAuthClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsAuthClient. - /// 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 SubpackageTtsSubpackageTtsAuthClient( - 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 SubpackageTtsSubpackageTtsAuthClient. - /// 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 SubpackageTtsSubpackageTtsAuthClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.Get.g.cs deleted file mode 100644 index 7ebd49a..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.Get.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsConversationsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetSecurityRequirement0, - }; - partial void PrepareGetArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get
- /// Retrieve a conversation by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetSecurityRequirements, - operationName: "GetAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/conversations/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/conversations/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/conversations/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/conversations/{id}\"", - 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::Speechify.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); - ProcessGetResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/conversations/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/conversations/{id}\"", - 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); - ProcessGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsConversation.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsConversation.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.List.g.cs deleted file mode 100644 index 452d161..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.List.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsConversationsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List conversations owned by the caller, ordered by most recent. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/conversations", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/conversations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/conversations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/conversations\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/conversations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/conversations\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListConversationsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListConversationsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListEvaluations.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListEvaluations.g.cs deleted file mode 100644 index d8a5a2f..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListEvaluations.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsConversationsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListEvaluationsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListEvaluationsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListEvaluationsSecurityRequirement0, - }; - partial void PrepareListEvaluationsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListEvaluationsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListEvaluationsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListEvaluationsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Evaluations
- /// Retrieve post-call evaluation results for a conversation. - ///
- /// - /// 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 ListEvaluationsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListEvaluationsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListEvaluationsSecurityRequirements, - operationName: "ListEvaluationsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/conversations/{id}/evaluations", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListEvaluationsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListEvaluations", - methodName: "ListEvaluationsAsync", - pathTemplate: "$\"/v1/conversations/{id}/evaluations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListEvaluations", - methodName: "ListEvaluationsAsync", - pathTemplate: "$\"/v1/conversations/{id}/evaluations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListEvaluations", - methodName: "ListEvaluationsAsync", - pathTemplate: "$\"/v1/conversations/{id}/evaluations\"", - 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::Speechify.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); - ProcessListEvaluationsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListEvaluations", - methodName: "ListEvaluationsAsync", - pathTemplate: "$\"/v1/conversations/{id}/evaluations\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListEvaluations", - methodName: "ListEvaluationsAsync", - pathTemplate: "$\"/v1/conversations/{id}/evaluations\"", - 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); - ProcessListEvaluationsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListEvaluationsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListEvaluationsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListMemories.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListMemories.g.cs deleted file mode 100644 index 18810e9..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListMemories.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsConversationsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListMemoriesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListMemoriesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListMemoriesSecurityRequirement0, - }; - partial void PrepareListMemoriesArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListMemoriesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListMemoriesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListMemoriesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Memories
- /// List memories extracted from a specific conversation. - ///
- /// - /// 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 ListMemoriesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListMemoriesArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListMemoriesSecurityRequirements, - operationName: "ListMemoriesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/conversations/{id}/memories", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListMemoriesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/conversations/{id}/memories\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/conversations/{id}/memories\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/conversations/{id}/memories\"", - 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::Speechify.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); - ProcessListMemoriesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/conversations/{id}/memories\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMemories", - methodName: "ListMemoriesAsync", - pathTemplate: "$\"/v1/conversations/{id}/memories\"", - 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); - ProcessListMemoriesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListMemoriesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListMemoriesResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListMessages.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListMessages.g.cs deleted file mode 100644 index bc02156..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.ListMessages.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsConversationsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListMessagesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListMessagesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListMessagesSecurityRequirement0, - }; - partial void PrepareListMessagesArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListMessagesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListMessagesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListMessagesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Messages
- /// Retrieve the full transcript for a conversation, in order. - ///
- /// - /// 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 ListMessagesAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListMessagesArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListMessagesSecurityRequirements, - operationName: "ListMessagesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/conversations/{id}/messages", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListMessagesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMessages", - methodName: "ListMessagesAsync", - pathTemplate: "$\"/v1/conversations/{id}/messages\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMessages", - methodName: "ListMessagesAsync", - pathTemplate: "$\"/v1/conversations/{id}/messages\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMessages", - methodName: "ListMessagesAsync", - pathTemplate: "$\"/v1/conversations/{id}/messages\"", - 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::Speechify.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); - ProcessListMessagesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMessages", - methodName: "ListMessagesAsync", - pathTemplate: "$\"/v1/conversations/{id}/messages\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMessages", - methodName: "ListMessagesAsync", - pathTemplate: "$\"/v1/conversations/{id}/messages\"", - 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); - ProcessListMessagesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListMessagesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListMessagesResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.g.cs deleted file mode 100644 index 37808f8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsConversationsClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsConversationsClient : global::Speechify.ISubpackageTtsSubpackageTtsConversationsClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsConversationsClient. - /// 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 SubpackageTtsSubpackageTtsConversationsClient( - 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 SubpackageTtsSubpackageTtsConversationsClient. - /// 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 SubpackageTtsSubpackageTtsConversationsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Create.g.cs deleted file mode 100644 index 9626e4f..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Create.g.cs +++ /dev/null @@ -1,421 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSecurityRequirement0, - }; - partial void PrepareCreateArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateKnowledgeBaseRequest request); - partial void PrepareCreateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateKnowledgeBaseRequest request); - partial void ProcessCreateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create
- /// Create a new knowledge base. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateKnowledgeBaseRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSecurityRequirements, - operationName: "CreateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/knowledge-bases", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.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); - ProcessCreateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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); - ProcessCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsKnowledgeBase.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsKnowledgeBase.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create
- /// Create a new knowledge base. - ///
- /// - /// Human-readable label. - /// - /// - /// Optional description. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - string name, - string? description = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateKnowledgeBaseRequest - { - Name = name, - Description = description, - }; - - return await CreateAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Delete.g.cs deleted file mode 100644 index a0791a8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Delete.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteSecurityRequirement0, - }; - partial void PrepareDeleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete
- /// Soft-delete a knowledge base. Documents and chunks are cascaded. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteSecurityRequirements, - operationName: "DeleteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.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); - ProcessDeleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.DeleteDocument.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.DeleteDocument.g.cs deleted file mode 100644 index f1a49da..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.DeleteDocument.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteDocumentSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteDocumentSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteDocumentSecurityRequirement0, - }; - partial void PrepareDeleteDocumentArguments( - global::System.Net.Http.HttpClient httpClient, - ref string docId); - partial void PrepareDeleteDocumentRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string docId); - partial void ProcessDeleteDocumentResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete Document
- /// Delete a document and all its chunks. - ///
- /// - /// 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 DeleteDocumentAsync( - string docId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteDocumentArguments( - httpClient: HttpClient, - docId: ref docId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteDocumentSecurityRequirements, - operationName: "DeleteDocumentAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/documents/{docId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteDocumentRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - docId: docId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteDocument", - methodName: "DeleteDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteDocument", - methodName: "DeleteDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteDocument", - methodName: "DeleteDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.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); - ProcessDeleteDocumentResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteDocument", - methodName: "DeleteDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteDocument", - methodName: "DeleteDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Get.g.cs deleted file mode 100644 index bf4ab8e..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Get.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetSecurityRequirement0, - }; - partial void PrepareGetArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get
- /// Retrieve a knowledge base by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetSecurityRequirements, - operationName: "GetAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.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); - ProcessGetResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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); - ProcessGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsKnowledgeBase.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsKnowledgeBase.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.GetDocument.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.GetDocument.g.cs deleted file mode 100644 index 6474347..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.GetDocument.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetDocumentSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetDocumentSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetDocumentSecurityRequirement0, - }; - partial void PrepareGetDocumentArguments( - global::System.Net.Http.HttpClient httpClient, - ref string docId); - partial void PrepareGetDocumentRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string docId); - partial void ProcessGetDocumentResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetDocumentResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Document
- /// Retrieve a document by ID. - ///
- /// - /// 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 GetDocumentAsync( - string docId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetDocumentArguments( - httpClient: HttpClient, - docId: ref docId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetDocumentSecurityRequirements, - operationName: "GetDocumentAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/documents/{docId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetDocumentRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - docId: docId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDocument", - methodName: "GetDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDocument", - methodName: "GetDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDocument", - methodName: "GetDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.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); - ProcessGetDocumentResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDocument", - methodName: "GetDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetDocument", - methodName: "GetDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}\"", - 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); - ProcessGetDocumentResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsKnowledgeBaseDocument.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsKnowledgeBaseDocument.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.List.g.cs deleted file mode 100644 index 0d09ed8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.List.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List knowledge bases owned by the caller. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/knowledge-bases", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/knowledge-bases\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListKnowledgeBasesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListKnowledgeBasesResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.ListChunks.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.ListChunks.g.cs deleted file mode 100644 index b9e9e55..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.ListChunks.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListChunksSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListChunksSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListChunksSecurityRequirement0, - }; - partial void PrepareListChunksArguments( - global::System.Net.Http.HttpClient httpClient, - ref string docId); - partial void PrepareListChunksRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string docId); - partial void ProcessListChunksResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListChunksResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Chunks
- /// List the chunks for a document. - ///
- /// - /// 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 ListChunksAsync( - string docId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListChunksArguments( - httpClient: HttpClient, - docId: ref docId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListChunksSecurityRequirements, - operationName: "ListChunksAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/documents/{docId}/chunks", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListChunksRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - docId: docId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListChunks", - methodName: "ListChunksAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}/chunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListChunks", - methodName: "ListChunksAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}/chunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListChunks", - methodName: "ListChunksAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}/chunks\"", - 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::Speechify.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); - ProcessListChunksResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListChunks", - methodName: "ListChunksAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}/chunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListChunks", - methodName: "ListChunksAsync", - pathTemplate: "$\"/v1/knowledge-bases/documents/{docId}/chunks\"", - 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); - ProcessListChunksResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListKnowledgeBaseChunksResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListKnowledgeBaseChunksResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.ListDocuments.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.ListDocuments.g.cs deleted file mode 100644 index 2f861b8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.ListDocuments.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListDocumentsSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListDocumentsSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListDocumentsSecurityRequirement0, - }; - partial void PrepareListDocumentsArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareListDocumentsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessListDocumentsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListDocumentsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Documents
- /// List documents ingested into a knowledge base. - ///
- /// - /// 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 ListDocumentsAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListDocumentsArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListDocumentsSecurityRequirements, - operationName: "ListDocumentsAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/{id}/documents", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListDocumentsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListDocuments", - methodName: "ListDocumentsAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListDocuments", - methodName: "ListDocumentsAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListDocuments", - methodName: "ListDocumentsAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.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); - ProcessListDocumentsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListDocuments", - methodName: "ListDocumentsAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListDocuments", - methodName: "ListDocumentsAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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); - ProcessListDocumentsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListKnowledgeBaseDocumentsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListKnowledgeBaseDocumentsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Search.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Search.g.cs deleted file mode 100644 index 208dd6d..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Search.g.cs +++ /dev/null @@ -1,431 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_SearchSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_SearchSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_SearchSecurityRequirement0, - }; - partial void PrepareSearchArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsSearchKnowledgeBasesRequest request); - partial void PrepareSearchRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsSearchKnowledgeBasesRequest request); - partial void ProcessSearchResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessSearchResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Search
- /// Semantic search across a caller-owned list of knowledge bases.
- /// Returns ranked chunks with source filename and a cosine-similarity
- /// score. Limited to 50 results per request. - ///
- /// - /// 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 SearchAsync( - - global::Speechify.TtsSearchKnowledgeBasesRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareSearchArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_SearchSecurityRequirements, - operationName: "SearchAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/knowledge-bases/search", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareSearchRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Search", - methodName: "SearchAsync", - pathTemplate: "\"/v1/knowledge-bases/search\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Search", - methodName: "SearchAsync", - pathTemplate: "\"/v1/knowledge-bases/search\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Search", - methodName: "SearchAsync", - pathTemplate: "\"/v1/knowledge-bases/search\"", - 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::Speechify.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); - ProcessSearchResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Search", - methodName: "SearchAsync", - pathTemplate: "\"/v1/knowledge-bases/search\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Search", - methodName: "SearchAsync", - pathTemplate: "\"/v1/knowledge-bases/search\"", - 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); - ProcessSearchResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsSearchKnowledgeBasesResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsSearchKnowledgeBasesResponse.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::Speechify.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(); - } - } - /// - /// Search
- /// Semantic search across a caller-owned list of knowledge bases.
- /// Returns ranked chunks with source filename and a cosine-similarity
- /// score. Limited to 50 results per request. - ///
- /// - /// Natural-language search query. - /// - /// - /// Knowledge bases to search across. Results scoped to caller-owned entries; unknown IDs are silently ignored. - /// - /// - /// Max hits to return (default 5, capped at 50).
- /// Default Value: 5 - /// - /// 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 SearchAsync( - string query, - global::System.Collections.Generic.IList kbIds, - int? topK = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsSearchKnowledgeBasesRequest - { - Query = query, - KbIds = kbIds, - TopK = topK, - }; - - return await SearchAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Update.g.cs deleted file mode 100644 index 30fc6e4..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.Update.g.cs +++ /dev/null @@ -1,426 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateSecurityRequirement0, - }; - partial void PrepareUpdateArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateKnowledgeBaseRequest request); - partial void PrepareUpdateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateKnowledgeBaseRequest request); - partial void ProcessUpdateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update
- /// Update a knowledge base. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - - global::Speechify.TtsUpdateKnowledgeBaseRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateSecurityRequirements, - operationName: "UpdateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.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); - ProcessUpdateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}\"", - 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); - ProcessUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsKnowledgeBase.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsKnowledgeBase.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update
- /// Update a knowledge base. - ///
- /// - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - string? name = default, - string? description = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateKnowledgeBaseRequest - { - Name = name, - Description = description, - }; - - return await UpdateAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.UploadDocument.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.UploadDocument.g.cs deleted file mode 100644 index a786efb..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.UploadDocument.g.cs +++ /dev/null @@ -1,468 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsKnowledgeBasesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UploadDocumentSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UploadDocumentSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UploadDocumentSecurityRequirement0, - }; - partial void PrepareUploadDocumentArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.UploadDocumentRequest request); - partial void PrepareUploadDocumentRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.UploadDocumentRequest request); - partial void ProcessUploadDocumentResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUploadDocumentResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Upload Document
- /// Upload a document (PDF, plain text, markdown, or HTML) to a
- /// knowledge base. The document is extracted, chunked, embedded, and
- /// indexed synchronously; expect a few seconds per MB of input.
- /// Maximum 10 MB per upload. - ///
- /// - /// - /// 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 UploadDocumentAsync( - string id, - - global::Speechify.UploadDocumentRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUploadDocumentArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UploadDocumentSecurityRequirements, - operationName: "UploadDocumentAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/knowledge-bases/{id}/documents", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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 __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); - __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent(id ?? string.Empty), - name: "\"id\""); - var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); - __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( - request.Filename is null - ? "application/octet-stream" - : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch - { - ".aac" => "audio/aac", - ".flac" => "audio/flac", - ".gif" => "image/gif", - ".jpeg" => "image/jpeg", - ".jpg" => "image/jpeg", - ".json" => "application/json", - ".m4a" => "audio/mp4", - ".mp3" => "audio/mpeg", - ".mp4" => "video/mp4", - ".mpeg" => "audio/mpeg", - ".mpga" => "audio/mpeg", - ".oga" => "audio/ogg", - ".ogg" => "audio/ogg", - ".opus" => "audio/ogg", - ".pdf" => "application/pdf", - ".png" => "image/png", - ".txt" => "text/plain", - ".wav" => "audio/wav", - ".weba" => "audio/webm", - ".webm" => "video/webm", - ".webp" => "image/webp", - _ => "application/octet-stream", - }); - __httpRequestContent.Add( - content: __contentFile, - name: "\"file\"", - fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); - if (__contentFile.Headers.ContentDisposition != null) - { - __contentFile.Headers.ContentDisposition.FileNameStar = null; - } - __httpRequest.Content = __httpRequestContent; - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUploadDocumentRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadDocument", - methodName: "UploadDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadDocument", - methodName: "UploadDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadDocument", - methodName: "UploadDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.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); - ProcessUploadDocumentResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadDocument", - methodName: "UploadDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadDocument", - methodName: "UploadDocumentAsync", - pathTemplate: "$\"/v1/knowledge-bases/{id}/documents\"", - 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); - ProcessUploadDocumentResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsKnowledgeBaseDocument.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsKnowledgeBaseDocument.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::Speechify.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(); - } - } - /// - /// Upload Document
- /// Upload a document (PDF, plain text, markdown, or HTML) to a
- /// knowledge base. The document is extracted, chunked, embedded, and
- /// indexed synchronously; expect a few seconds per MB of input.
- /// Maximum 10 MB per upload. - ///
- /// - /// - /// - /// 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 UploadDocumentAsync( - string id, - byte[] file, - string filename, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.UploadDocumentRequest - { - File = file, - Filename = filename, - }; - - return await UploadDocumentAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.g.cs deleted file mode 100644 index 3e9b146..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsKnowledgeBasesClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsKnowledgeBasesClient : global::Speechify.ISubpackageTtsSubpackageTtsKnowledgeBasesClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsKnowledgeBasesClient. - /// 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 SubpackageTtsSubpackageTtsKnowledgeBasesClient( - 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 SubpackageTtsSubpackageTtsKnowledgeBasesClient. - /// 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 SubpackageTtsSubpackageTtsKnowledgeBasesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsMemoriesClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsMemoriesClient.Delete.g.cs deleted file mode 100644 index 0d105d8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsMemoriesClient.Delete.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsMemoriesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteSecurityRequirement0, - }; - partial void PrepareDeleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string memoryId); - partial void PrepareDeleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string memoryId); - partial void ProcessDeleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete
- /// Soft-delete one memory row. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task DeleteAsync( - string memoryId, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteArguments( - httpClient: HttpClient, - memoryId: ref memoryId); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteSecurityRequirements, - operationName: "DeleteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/memories/{memoryId}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - memoryId: memoryId!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/memories/{memoryId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/memories/{memoryId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/memories/{memoryId}\"", - 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::Speechify.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); - ProcessDeleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/memories/{memoryId}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/memories/{memoryId}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsMemoriesClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsMemoriesClient.g.cs deleted file mode 100644 index d8ea915..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsMemoriesClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsMemoriesClient : global::Speechify.ISubpackageTtsSubpackageTtsMemoriesClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsMemoriesClient. - /// 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 SubpackageTtsSubpackageTtsMemoriesClient( - 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 SubpackageTtsSubpackageTtsMemoriesClient. - /// 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 SubpackageTtsSubpackageTtsMemoriesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsOutboundCallsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsOutboundCallsClient.Create.g.cs deleted file mode 100644 index c508c77..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsOutboundCallsClient.Create.g.cs +++ /dev/null @@ -1,423 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsOutboundCallsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSecurityRequirement0, - }; - partial void PrepareCreateArguments( - global::System.Net.Http.HttpClient httpClient, - object request); - partial void PrepareCreateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - object request); - partial void ProcessCreateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create
- /// Place an outbound call from an agent to a phone number. LiveKit
- /// originates the SIP INVITE through the outbound trunk bound to the
- /// agent's workspace; the agent worker is dispatched into the room
- /// automatically.
- /// The response is returned as soon as LiveKit accepts the INVITE.
- /// Poll `GET /v1/conversations/{conversation_id}` for status
- /// transitions: `pending` → `active` (answered) → `completed`.
- /// Requires a Twilio or BYOC trunk. LiveKit-native numbers are
- /// inbound-only. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSecurityRequirements, - operationName: "CreateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/outbound-calls", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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 = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/outbound-calls\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/outbound-calls\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/outbound-calls\"", - 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::Speechify.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); - ProcessCreateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/outbound-calls\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/outbound-calls\"", - 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); - ProcessCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create
- /// Place an outbound call from an agent to a phone number. LiveKit
- /// originates the SIP INVITE through the outbound trunk bound to the
- /// agent's workspace; the agent worker is dispatched into the room
- /// automatically.
- /// The response is returned as soon as LiveKit accepts the INVITE.
- /// Poll `GET /v1/conversations/{conversation_id}` for status
- /// transitions: `pending` → `active` (answered) → `completed`.
- /// Requires a Twilio or BYOC trunk. LiveKit-native numbers are
- /// inbound-only. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new object - { - }; - - return await CreateAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsOutboundCallsClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsOutboundCallsClient.g.cs deleted file mode 100644 index 4308857..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsOutboundCallsClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsOutboundCallsClient : global::Speechify.ISubpackageTtsSubpackageTtsOutboundCallsClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsOutboundCallsClient. - /// 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 SubpackageTtsSubpackageTtsOutboundCallsClient( - 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 SubpackageTtsSubpackageTtsOutboundCallsClient. - /// 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 SubpackageTtsSubpackageTtsOutboundCallsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Delete.g.cs deleted file mode 100644 index 02c6629..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Delete.g.cs +++ /dev/null @@ -1,363 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsPhoneNumbersClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteSecurityRequirement0, - }; - partial void PrepareDeleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete
- /// Delete a phone number from the workspace. For Twilio and LiveKit
- /// numbers this also deprovisions the backing SIP trunk and dispatch
- /// rule on LiveKit Cloud. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteSecurityRequirements, - operationName: "DeleteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/phone-numbers/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.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); - ProcessDeleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Get.g.cs deleted file mode 100644 index 6b7d416..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Get.g.cs +++ /dev/null @@ -1,378 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsPhoneNumbersClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetSecurityRequirement0, - }; - partial void PrepareGetArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get
- /// Retrieve a phone number by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetSecurityRequirements, - operationName: "GetAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/phone-numbers/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.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); - ProcessGetResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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); - ProcessGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Import.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Import.g.cs deleted file mode 100644 index a7ab4c4..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Import.g.cs +++ /dev/null @@ -1,425 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsPhoneNumbersClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ImportSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ImportSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ImportSecurityRequirement0, - }; - partial void PrepareImportArguments( - global::System.Net.Http.HttpClient httpClient, - object request); - partial void PrepareImportRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - object request); - partial void ProcessImportResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessImportResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Import
- /// Import a phone number into the workspace. The `source` field
- /// determines the provisioning path:
- /// - `livekit` - LiveKit purchases the number on your behalf. US
- /// inbound only. Quickest path for local testing.
- /// - `twilio` - Provide your Twilio Account SID, Auth Token, and
- /// the E.164 number you already own. We provision an Elastic SIP
- /// Trunk on your Twilio account automatically.
- /// - `byoc` - Provide an existing SIP trunk ID. The number is
- /// registered against that trunk.
- /// Returns 402 when the workspace has reached the 100-number cap. - ///
- /// - /// 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 ImportAsync( - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareImportArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ImportSecurityRequirements, - operationName: "ImportAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/phone-numbers", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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 = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareImportRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Import", - methodName: "ImportAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Import", - methodName: "ImportAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Import", - methodName: "ImportAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.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); - ProcessImportResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Import", - methodName: "ImportAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Import", - methodName: "ImportAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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); - ProcessImportResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.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(); - } - } - /// - /// Import
- /// Import a phone number into the workspace. The `source` field
- /// determines the provisioning path:
- /// - `livekit` - LiveKit purchases the number on your behalf. US
- /// inbound only. Quickest path for local testing.
- /// - `twilio` - Provide your Twilio Account SID, Auth Token, and
- /// the E.164 number you already own. We provision an Elastic SIP
- /// Trunk on your Twilio account automatically.
- /// - `byoc` - Provide an existing SIP trunk ID. The number is
- /// registered against that trunk.
- /// Returns 402 when the workspace has reached the 100-number cap. - ///
- /// 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 ImportAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new object - { - }; - - return await ImportAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.List.g.cs deleted file mode 100644 index 884b221..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.List.g.cs +++ /dev/null @@ -1,372 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsPhoneNumbersClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List all phone numbers in the caller's workspace. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/phone-numbers", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/phone-numbers\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Update.g.cs deleted file mode 100644 index ce0bc27..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.Update.g.cs +++ /dev/null @@ -1,420 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsPhoneNumbersClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateSecurityRequirement0, - }; - partial void PrepareUpdateArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - object request); - partial void PrepareUpdateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - object request); - partial void ProcessUpdateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update
- /// Update a phone number. Only `label` and `agent_id` are mutable;
- /// `source` and `e164` are immutable after import. Pass `null` for
- /// `agent_id` to unbind the number from its current agent. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateSecurityRequirements, - operationName: "UpdateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/phone-numbers/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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 = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.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); - ProcessUpdateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/phone-numbers/{id}\"", - 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); - ProcessUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update
- /// Update a phone number. Only `label` and `agent_id` are mutable;
- /// `source` and `e164` are immutable after import. Pass `null` for
- /// `agent_id` to unbind the number from its current agent. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new object - { - }; - - return await UpdateAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.g.cs deleted file mode 100644 index 3c292bb..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsPhoneNumbersClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsPhoneNumbersClient : global::Speechify.ISubpackageTtsSubpackageTtsPhoneNumbersClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsPhoneNumbersClient. - /// 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 SubpackageTtsSubpackageTtsPhoneNumbersClient( - 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 SubpackageTtsSubpackageTtsPhoneNumbersClient. - /// 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 SubpackageTtsSubpackageTtsPhoneNumbersClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Create.g.cs deleted file mode 100644 index 242d22b..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Create.g.cs +++ /dev/null @@ -1,415 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsSipTrunksClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSecurityRequirement0, - }; - partial void PrepareCreateArguments( - global::System.Net.Http.HttpClient httpClient, - object request); - partial void PrepareCreateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - object request); - partial void ProcessCreateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create
- /// Create a SIP trunk. For `kind=byoc` supply `sip_address` plus
- /// optional digest credentials and IP allowlist. For `kind=twilio`
- /// use `ImportPhoneNumber` with a `twilio` spec instead - trunk
- /// creation is handled automatically. Returns 402 when the workspace
- /// has reached the 20-trunk cap. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - - object request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSecurityRequirements, - operationName: "CreateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/sip-trunks", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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 = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.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); - ProcessCreateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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); - ProcessCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create
- /// Create a SIP trunk. For `kind=byoc` supply `sip_address` plus
- /// optional digest credentials and IP allowlist. For `kind=twilio`
- /// use `ImportPhoneNumber` with a `twilio` spec instead - trunk
- /// creation is handled automatically. Returns 402 when the workspace
- /// has reached the 20-trunk cap. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new object - { - }; - - return await CreateAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Delete.g.cs deleted file mode 100644 index acd7001..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Delete.g.cs +++ /dev/null @@ -1,364 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsSipTrunksClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteSecurityRequirement0, - }; - partial void PrepareDeleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete
- /// Delete a SIP trunk. This also removes the backing LiveKit inbound
- /// trunk, outbound trunk, and dispatch rule if they were provisioned
- /// by us. Phone numbers attached to this trunk are left in place but
- /// become non-functional until rebound to a new trunk. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteSecurityRequirements, - operationName: "DeleteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/sip-trunks/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.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); - ProcessDeleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Get.g.cs deleted file mode 100644 index 2e3fa2f..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.Get.g.cs +++ /dev/null @@ -1,378 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsSipTrunksClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetSecurityRequirement0, - }; - partial void PrepareGetArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get
- /// Retrieve a SIP trunk by ID. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetSecurityRequirements, - operationName: "GetAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/sip-trunks/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.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); - ProcessGetResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/sip-trunks/{id}\"", - 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); - ProcessGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.List.g.cs deleted file mode 100644 index 91d9b45..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.List.g.cs +++ /dev/null @@ -1,372 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsSipTrunksClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List all SIP trunks in the caller's workspace. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/sip-trunks", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/sip-trunks\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return __content; - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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(); - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return __content; - } - 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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.g.cs deleted file mode 100644 index 60abdec..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsSipTrunksClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsSipTrunksClient : global::Speechify.ISubpackageTtsSubpackageTtsSipTrunksClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsSipTrunksClient. - /// 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 SubpackageTtsSubpackageTtsSipTrunksClient( - 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 SubpackageTtsSubpackageTtsSipTrunksClient. - /// 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 SubpackageTtsSubpackageTtsSipTrunksClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Create.g.cs deleted file mode 100644 index a6006b7..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Create.g.cs +++ /dev/null @@ -1,432 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsToolsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSecurityRequirement0, - }; - partial void PrepareCreateArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateToolRequest request); - partial void PrepareCreateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateToolRequest request); - partial void ProcessCreateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create
- /// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
- /// reads return a masked placeholder. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateToolRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSecurityRequirements, - operationName: "CreateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tools", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.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); - ProcessCreateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tools\"", - 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); - ProcessCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTool.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTool.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create
- /// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
- /// reads return a masked placeholder. - ///
- /// - /// - /// - /// Where the tool executes.
- /// - `system`: worker-resident built-in (e.g. end_call, transfer_to_number)
- /// - `webhook`: worker signs a payload and POSTs it to your URL
- /// - `client`: worker dispatches to the caller's browser/SDK via data channel - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - string name, - string description, - global::Speechify.TtsToolKind kind, - global::Speechify.TtsCreateToolRequestConfig config, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateToolRequest - { - Name = name, - Description = description, - Kind = kind, - Config = config, - }; - - return await CreateAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Delete.g.cs deleted file mode 100644 index c412c82..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Delete.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsToolsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteSecurityRequirement0, - }; - partial void PrepareDeleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareDeleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessDeleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Delete
- /// Delete a tool. Agents that had it attached get a soft-detach. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task DeleteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareDeleteArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_DeleteSecurityRequirements, - operationName: "DeleteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tools/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareDeleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.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); - ProcessDeleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Delete", - methodName: "DeleteAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Get.g.cs deleted file mode 100644 index 19415ab..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Get.g.cs +++ /dev/null @@ -1,382 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsToolsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetSecurityRequirement0, - }; - partial void PrepareGetArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareGetRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessGetResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get
- /// Retrieve a tool by ID. Webhook secrets are always masked here. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task GetAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetSecurityRequirements, - operationName: "GetAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tools/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.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); - ProcessGetResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Get", - methodName: "GetAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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); - ProcessGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTool.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTool.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.List.g.cs deleted file mode 100644 index 4003bb5..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.List.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsToolsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List tools owned by the caller. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tools", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tools\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tools\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsListToolsResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsListToolsResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Update.g.cs deleted file mode 100644 index d4c9865..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.Update.g.cs +++ /dev/null @@ -1,429 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsToolsClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateSecurityRequirement0, - }; - partial void PrepareUpdateArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Speechify.TtsUpdateToolRequest request); - partial void PrepareUpdateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Speechify.TtsUpdateToolRequest request); - partial void ProcessUpdateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update
- /// Update a tool. Tool kind is immutable — create a new tool to change it. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - - global::Speechify.TtsUpdateToolRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateSecurityRequirements, - operationName: "UpdateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tools/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.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); - ProcessUpdateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Update", - methodName: "UpdateAsync", - pathTemplate: "$\"/v1/tools/{id}\"", - 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); - ProcessUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTool.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTool.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update
- /// Update a tool. Tool kind is immutable — create a new tool to change it. - ///
- /// - /// - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task UpdateAsync( - string id, - string? name = default, - string? description = default, - global::Speechify.TtsUpdateToolRequestConfig? config = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateToolRequest - { - Name = name, - Description = description, - Config = config, - }; - - return await UpdateAsync( - id: id, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.g.cs deleted file mode 100644 index f387e87..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsToolsClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsToolsClient : global::Speechify.ISubpackageTtsSubpackageTtsToolsClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsToolsClient. - /// 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 SubpackageTtsSubpackageTtsToolsClient( - 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 SubpackageTtsSubpackageTtsToolsClient. - /// 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 SubpackageTtsSubpackageTtsToolsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Create.g.cs index 1bab704..4e5501b 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Create.g.cs @@ -42,7 +42,7 @@ partial void ProcessCreateResponseContent( ref string content); /// - /// Create
+ /// Create Voice
/// Create a personal (cloned) voice for the user ///
/// @@ -51,6 +51,29 @@ partial void ProcessCreateResponseContent( /// public async global::System.Threading.Tasks.Task CreateAsync( + global::Speechify.CreateRequest request, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Voice
+ /// Create a personal (cloned) voice for the user + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateAsResponseAsync( + global::Speechify.CreateRequest request, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -81,10 +104,11 @@ partial void ProcessCreateResponseContent( var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Speechify.PathBuilder( path: "/v1/voices", baseUri: HttpClient.BaseAddress); @@ -117,20 +141,24 @@ partial void ProcessCreateResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), name: "\"name\""); + if (request.Locale != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Locale ?? string.Empty), name: "\"locale\""); + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Gender.ToValueString()), name: "\"gender\""); + var __contentSample = new global::System.Net.Http.ByteArrayContent(request.Sample ?? global::System.Array.Empty()); __contentSample.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( request.Samplename is null @@ -168,6 +196,7 @@ request.Samplename is null { __contentSample.Headers.ContentDisposition.FileNameStar = null; } + if (request.Avatar != default) { @@ -208,11 +237,14 @@ request.Avatarname is null { __contentAvatar.Headers.ContentDisposition.FileNameStar = null; } + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Consent ?? string.Empty), name: "\"consent\""); + __httpRequest.Content = __httpRequestContent; + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -254,6 +286,8 @@ request.Avatarname is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -264,6 +298,11 @@ request.Avatarname is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -281,6 +320,8 @@ request.Avatarname is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -290,8 +331,7 @@ request.Avatarname is null __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -300,6 +340,11 @@ request.Avatarname is null __attempt < __maxAttempts && global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -316,14 +361,15 @@ request.Avatarname is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -363,6 +409,8 @@ request.Avatarname is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -383,8 +431,158 @@ request.Avatarname is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.TtsError? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -407,23 +605,25 @@ request.Avatarname is null { __response.EnsureSuccessStatusCode(); - return - global::Speechify.TtsCreatedVoice.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Speechify.TtsCreatedVoice.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -437,9 +637,13 @@ request.Avatarname is null #endif ).ConfigureAwait(false); - return - await global::Speechify.TtsCreatedVoice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Speechify.TtsCreatedVoice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -456,17 +660,15 @@ request.Avatarname is null { } - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -478,7 +680,7 @@ request.Avatarname is null } } /// - /// Create
+ /// Create Voice
/// Create a personal (cloned) voice for the user ///
/// @@ -543,5 +745,1320 @@ request.Avatarname is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Create Voice
+ /// Create a personal (cloned) voice for the user + ///
+ /// + /// Name of the personal voice + /// + /// + /// Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)
+ /// Default Value: en-US + /// + /// + /// Gender marker for the personal voice
+ /// male GenderMale
+ /// female GenderFemale
+ /// notSpecified GenderNotSpecified + /// + /// + /// Audio sample file + /// + /// + /// Audio sample file + /// + /// + /// Avatar image file + /// + /// + /// Avatar image file + /// + /// + /// A **string** representing the user consent information in JSON format
+ /// This should include the fullName and email of the consenting individual.
+ /// For example, `{"fullName": "John Doe", "email": "john@example.com"}` + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateAsync( + string name, + global::Speechify.TtsV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender gender, + global::System.IO.Stream sample, + string samplename, + string consent, + string? locale = default, + global::System.IO.Stream? avatar = default, + string? avatarname = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + sample = sample ?? throw new global::System.ArgumentNullException(nameof(sample)); + var request = new global::Speechify.CreateRequest + { + Name = name, + Locale = locale, + Gender = gender, + Sample = global::System.Array.Empty(), + Samplename = samplename, + Avatar = global::System.Array.Empty(), + Avatarname = avatarname, + Consent = consent, + }; + PrepareArguments( + client: HttpClient); + PrepareCreateArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateSecurityRequirements, + operationName: "CreateAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: "/v1/voices", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Speechify.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 __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + if (request.Locale != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Locale ?? string.Empty), + name: "\"locale\""); + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Gender.ToValueString()), + name: "\"gender\""); + + var __contentSample = new global::System.Net.Http.StreamContent(sample); + __contentSample.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Samplename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Samplename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSample, + name: "\"sample\"", + fileName: request.Samplename != null ? $"\"{request.Samplename}\"" : string.Empty); + if (__contentSample.Headers.ContentDisposition != null) + { + __contentSample.Headers.ContentDisposition.FileNameStar = null; + } + + if (avatar != default) + { + + var __contentAvatar = new global::System.Net.Http.StreamContent(avatar); + __contentAvatar.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Avatarname is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Avatarname) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentAvatar, + name: "\"avatar\"", + fileName: request.Avatarname != null ? $"\"{request.Avatarname}\"" : string.Empty); + if (__contentAvatar.Headers.ContentDisposition != null) + { + __contentAvatar.Headers.ContentDisposition.FileNameStar = null; + } + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Consent ?? string.Empty), + name: "\"consent\""); + + __httpRequest.Content = __httpRequestContent; + + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateRequest( + 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.TtsError? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Speechify.TtsCreatedVoice.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Speechify.TtsCreatedVoice.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 global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Voice
+ /// Create a personal (cloned) voice for the user + ///
+ /// + /// Name of the personal voice + /// + /// + /// Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)
+ /// Default Value: en-US + /// + /// + /// Gender marker for the personal voice
+ /// male GenderMale
+ /// female GenderFemale
+ /// notSpecified GenderNotSpecified + /// + /// + /// Audio sample file + /// + /// + /// Audio sample file + /// + /// + /// Avatar image file + /// + /// + /// Avatar image file + /// + /// + /// A **string** representing the user consent information in JSON format
+ /// This should include the fullName and email of the consenting individual.
+ /// For example, `{"fullName": "John Doe", "email": "john@example.com"}` + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateAsResponseAsync( + string name, + global::Speechify.TtsV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender gender, + global::System.IO.Stream sample, + string samplename, + string consent, + string? locale = default, + global::System.IO.Stream? avatar = default, + string? avatarname = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + sample = sample ?? throw new global::System.ArgumentNullException(nameof(sample)); + var request = new global::Speechify.CreateRequest + { + Name = name, + Locale = locale, + Gender = gender, + Sample = global::System.Array.Empty(), + Samplename = samplename, + Avatar = global::System.Array.Empty(), + Avatarname = avatarname, + Consent = consent, + }; + PrepareArguments( + client: HttpClient); + PrepareCreateArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateSecurityRequirements, + operationName: "CreateAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: "/v1/voices", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Speechify.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 __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + if (request.Locale != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Locale ?? string.Empty), + name: "\"locale\""); + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Gender.ToValueString()), + name: "\"gender\""); + + var __contentSample = new global::System.Net.Http.StreamContent(sample); + __contentSample.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Samplename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Samplename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSample, + name: "\"sample\"", + fileName: request.Samplename != null ? $"\"{request.Samplename}\"" : string.Empty); + if (__contentSample.Headers.ContentDisposition != null) + { + __contentSample.Headers.ContentDisposition.FileNameStar = null; + } + + if (avatar != default) + { + + var __contentAvatar = new global::System.Net.Http.StreamContent(avatar); + __contentAvatar.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Avatarname is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Avatarname) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentAvatar, + name: "\"avatar\"", + fileName: request.Avatarname != null ? $"\"{request.Avatarname}\"" : string.Empty); + if (__contentAvatar.Headers.ContentDisposition != null) + { + __contentAvatar.Headers.ContentDisposition.FileNameStar = null; + } + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Consent ?? string.Empty), + name: "\"consent\""); + + __httpRequest.Content = __httpRequestContent; + + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateRequest( + 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/voices\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.TtsError? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.TtsError.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.TtsCreatedVoice.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Speechify.TtsCreatedVoice.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs index 0a31986..e347fac 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.Delete.g.cs @@ -36,15 +36,41 @@ partial void ProcessDeleteResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); + partial void ProcessDeleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// - /// Delete
+ /// Delete Voice
/// Delete a personal (cloned) voice ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task DeleteAsync( + public async global::System.Threading.Tasks.Task DeleteAsync( + string id, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Voice
+ /// Delete a personal (cloned) voice + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> DeleteAsResponseAsync( string id, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -77,6 +103,7 @@ partial void ProcessDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Speechify.PathBuilder( path: $"/v1/voices/{id}", baseUri: HttpClient.BaseAddress); @@ -150,6 +177,8 @@ partial void ProcessDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +189,11 @@ partial void ProcessDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +211,8 @@ partial void ProcessDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +222,7 @@ partial void ProcessDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +231,11 @@ partial void ProcessDeleteResponse( __attempt < __maxAttempts && global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +252,15 @@ partial void ProcessDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +300,8 @@ partial void ProcessDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,8 +322,158 @@ partial void ProcessDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The referenced resource does not exist or is not visible to the caller's workspace. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Speechify.TtsError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -294,25 +487,32 @@ partial void ProcessDeleteResponse( client: HttpClient, response: __response, content: ref __content); + ProcessDeleteResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); try { __response.EnsureSuccessStatusCode(); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -320,6 +520,17 @@ partial void ProcessDeleteResponse( try { __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -336,17 +547,15 @@ partial void ProcessDeleteResponse( { } - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs index cc1b932..8ccacfb 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.DownloadSample.g.cs @@ -42,7 +42,7 @@ partial void ProcessDownloadSampleResponseContent( ref byte[] content); /// - /// Download Sample
+ /// Download Voice Sample
/// Download a personal (cloned) voice sample ///
/// @@ -53,6 +53,27 @@ partial void ProcessDownloadSampleResponseContent( string id, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DownloadSampleAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Download Voice Sample
+ /// Download a personal (cloned) voice sample + ///
+ /// + /// 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 DownloadSampleAsStreamAsync( + string id, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessDownloadSampleResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Speechify.PathBuilder( path: $"/v1/voices/{id}/sample", baseUri: HttpClient.BaseAddress); @@ -155,16 +177,23 @@ partial void ProcessDownloadSampleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { __response = await HttpClient.SendAsync( request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessDownloadSampleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessDownloadSampleResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessDownloadSampleResponseContent( __attempt < __maxAttempts && global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,478 @@ partial void ProcessDownloadSampleResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + try + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDownloadSampleResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DownloadSample", + methodName: "DownloadSampleAsync", + pathTemplate: "$\"/v1/voices/{id}/sample\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DownloadSample", + methodName: "DownloadSampleAsync", + pathTemplate: "$\"/v1/voices/{id}/sample\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The referenced resource does not exist or is not visible to the caller's workspace. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Speechify.TtsError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Speechify.ResponseStream(__response, __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + } + catch + { + __response.Dispose(); + throw; + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Download Voice Sample
+ /// Download a personal (cloned) voice sample + ///
+ /// + /// 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> DownloadSampleAsResponseAsync( + string id, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDownloadSampleArguments( + httpClient: HttpClient, + id: ref id); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DownloadSampleSecurityRequirements, + operationName: "DownloadSampleAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: $"/v1/voices/{id}/sample", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDownloadSampleRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id!); + + 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DownloadSample", + methodName: "DownloadSampleAsync", + pathTemplate: "$\"/v1/voices/{id}/sample\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DownloadSample", + methodName: "DownloadSampleAsync", + pathTemplate: "$\"/v1/voices/{id}/sample\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( clientOptions: Options, requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "DownloadSample", + methodName: "DownloadSampleAsync", + pathTemplate: "$\"/v1/voices/{id}/sample\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +763,8 @@ partial void ProcessDownloadSampleResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,8 +785,158 @@ partial void ProcessDownloadSampleResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The referenced resource does not exist or is not visible to the caller's workspace. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Speechify.TtsError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -304,20 +955,23 @@ partial void ProcessDownloadSampleResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: null, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -331,7 +985,11 @@ partial void ProcessDownloadSampleResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -348,17 +1006,15 @@ partial void ProcessDownloadSampleResponseContent( { } - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.List.g.cs index d14c51f..0b7210b 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.List.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.List.g.cs @@ -40,7 +40,7 @@ partial void ProcessListResponseContent( ref string content); /// - /// List
+ /// List Voices
/// Gets the list of voices available for the user ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -49,6 +49,24 @@ partial void ProcessListResponseContent( public async global::System.Threading.Tasks.Task> ListAsync( global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Voices
+ /// Gets the list of voices available for the user + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListAsResponseAsync( + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +95,7 @@ partial void ProcessListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Speechify.PathBuilder( path: "/v1/voices", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessListResponseContent( __attempt < __maxAttempts && global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,8 +313,121 @@ partial void ProcessListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } + // Authentication is missing or invalid. The request did not carry a recognised credential (Firebase ID token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The referenced resource does not exist or is not visible to the caller's workspace. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Speechify.TtsError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Speechify.TtsError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Speechify.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::Speechify.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -302,23 +450,25 @@ partial void ProcessListResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -332,9 +482,13 @@ partial void ProcessListResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -351,17 +505,15 @@ partial void ProcessListResponseContent( { } - throw new global::Speechify.ApiException( + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.g.cs index 6c469db..b68e14f 100644 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsVoicesClient.g.cs @@ -61,6 +61,27 @@ public SubpackageTtsSubpackageTtsVoicesClient( { } + /// + /// Creates a new instance of the SubpackageTtsSubpackageTtsVoicesClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public SubpackageTtsSubpackageTtsVoicesClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + /// /// Creates a new instance of the SubpackageTtsSubpackageTtsVoicesClient. /// If no httpClient is provided, a new one will be created. @@ -72,10 +93,10 @@ public SubpackageTtsSubpackageTtsVoicesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SubpackageTtsSubpackageTtsVoicesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.AcceptInvite.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.AcceptInvite.g.cs deleted file mode 100644 index 80af1df..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.AcceptInvite.g.cs +++ /dev/null @@ -1,384 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_AcceptInviteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_AcceptInviteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_AcceptInviteSecurityRequirement0, - }; - partial void PrepareAcceptInviteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string token); - partial void PrepareAcceptInviteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string token); - partial void ProcessAcceptInviteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessAcceptInviteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Accept Invite
- /// Accept a workspace invite. The authenticated caller is joined
- /// to the invite's workspace as a member. Expired, revoked, or
- /// already-accepted tokens return 404 to avoid token enumeration. - ///
- /// - /// 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 AcceptInviteAsync( - string token, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareAcceptInviteArguments( - httpClient: HttpClient, - token: ref token); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_AcceptInviteSecurityRequirements, - operationName: "AcceptInviteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/invites/{token}/accept", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareAcceptInviteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - token: token!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AcceptInvite", - methodName: "AcceptInviteAsync", - pathTemplate: "$\"/v1/invites/{token}/accept\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AcceptInvite", - methodName: "AcceptInviteAsync", - pathTemplate: "$\"/v1/invites/{token}/accept\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AcceptInvite", - methodName: "AcceptInviteAsync", - pathTemplate: "$\"/v1/invites/{token}/accept\"", - 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::Speechify.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); - ProcessAcceptInviteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AcceptInvite", - methodName: "AcceptInviteAsync", - pathTemplate: "$\"/v1/invites/{token}/accept\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "AcceptInvite", - methodName: "AcceptInviteAsync", - pathTemplate: "$\"/v1/invites/{token}/accept\"", - 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); - ProcessAcceptInviteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTenant.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTenant.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.Create.g.cs deleted file mode 100644 index 0373152..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.Create.g.cs +++ /dev/null @@ -1,420 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateSecurityRequirement0, - }; - partial void PrepareCreateArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateWorkspaceRequest request); - partial void PrepareCreateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateWorkspaceRequest request); - partial void ProcessCreateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create
- /// Create a new workspace with the authenticated user as owner.
- /// The caller must switch their active workspace client-side via
- /// the `X-Tenant-ID` header to act on the new tenant. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - - global::Speechify.TtsCreateWorkspaceRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSecurityRequirements, - operationName: "CreateAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.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); - ProcessCreateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Create", - methodName: "CreateAsync", - pathTemplate: "\"/v1/tenants\"", - 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); - ProcessCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTenant.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTenant.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create
- /// Create a new workspace with the authenticated user as owner.
- /// The caller must switch their active workspace client-side via
- /// the `X-Tenant-ID` header to act on the new tenant. - ///
- /// - /// Display name for the new workspace. Trimmed; must be 120 characters or fewer. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateAsync( - string? name = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateWorkspaceRequest - { - Name = name, - }; - - return await CreateAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.CreateInvite.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.CreateInvite.g.cs deleted file mode 100644 index f7c655f..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.CreateInvite.g.cs +++ /dev/null @@ -1,420 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_CreateInviteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_CreateInviteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_CreateInviteSecurityRequirement0, - }; - partial void PrepareCreateInviteArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsCreateInviteRequest request); - partial void PrepareCreateInviteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsCreateInviteRequest request); - partial void ProcessCreateInviteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateInviteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Invite
- /// Create an invite to the current workspace. Owner or admin only.
- /// The response contains the invite token ONCE — subsequent list
- /// calls redact it. - ///
- /// - /// 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 CreateInviteAsync( - - global::Speechify.TtsCreateInviteRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateInviteArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateInviteSecurityRequirements, - operationName: "CreateInviteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current/invites", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateInviteRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateInvite", - methodName: "CreateInviteAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateInvite", - methodName: "CreateInviteAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateInvite", - methodName: "CreateInviteAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.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); - ProcessCreateInviteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateInvite", - methodName: "CreateInviteAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateInvite", - methodName: "CreateInviteAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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); - ProcessCreateInviteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsInvite.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsInvite.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create Invite
- /// Create an invite to the current workspace. Owner or admin only.
- /// The response contains the invite token ONCE — subsequent list
- /// calls redact it. - ///
- /// - /// Email of the person to invite. Validated as an RFC 5322 address. - /// - /// 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 CreateInviteAsync( - string email, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsCreateInviteRequest - { - Email = email, - }; - - return await CreateInviteAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.GetCurrent.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.GetCurrent.g.cs deleted file mode 100644 index 129f4d8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.GetCurrent.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_GetCurrentSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetCurrentSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_GetCurrentSecurityRequirement0, - }; - partial void PrepareGetCurrentArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareGetCurrentRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessGetCurrentResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetCurrentResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Current
- /// Retrieve the workspace currently selected by the caller (via `X-Tenant-ID` or auto-resolved). - ///
- /// 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 GetCurrentAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetCurrentArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetCurrentSecurityRequirements, - operationName: "GetCurrentAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareGetCurrentRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetCurrent", - methodName: "GetCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetCurrent", - methodName: "GetCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetCurrent", - methodName: "GetCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.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); - ProcessGetCurrentResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetCurrent", - methodName: "GetCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetCurrent", - methodName: "GetCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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); - ProcessGetCurrentResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTenant.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTenant.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.Leave.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.Leave.g.cs deleted file mode 100644 index 5ea03bc..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.Leave.g.cs +++ /dev/null @@ -1,357 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_LeaveSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_LeaveSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_LeaveSecurityRequirement0, - }; - partial void PrepareLeaveArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareLeaveRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessLeaveResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Leave
- /// Remove the authenticated caller from the current workspace.
- /// Refused with 409 when the caller is the last owner — promote
- /// another member to owner first. - ///
- /// 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 LeaveAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareLeaveArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_LeaveSecurityRequirements, - operationName: "LeaveAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current/members/leave", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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); - } - } - global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareLeaveRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Leave", - methodName: "LeaveAsync", - pathTemplate: "\"/v1/tenants/current/members/leave\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Leave", - methodName: "LeaveAsync", - pathTemplate: "\"/v1/tenants/current/members/leave\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Leave", - methodName: "LeaveAsync", - pathTemplate: "\"/v1/tenants/current/members/leave\"", - 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::Speechify.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); - ProcessLeaveResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Leave", - methodName: "LeaveAsync", - pathTemplate: "\"/v1/tenants/current/members/leave\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "Leave", - methodName: "LeaveAsync", - pathTemplate: "\"/v1/tenants/current/members/leave\"", - 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); - - try - { - __response.EnsureSuccessStatusCode(); - - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.List.g.cs deleted file mode 100644 index ffbf8e8..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.List.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListSecurityRequirement0, - }; - partial void PrepareListArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List
- /// List every workspace the authenticated user belongs to. Powers the workspace switcher. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ListAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListSecurityRequirements, - operationName: "ListAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.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); - ProcessListResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tenants\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "List", - methodName: "ListAsync", - pathTemplate: "\"/v1/tenants\"", - 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); - ProcessListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTenantsListResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTenantsListResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.ListInvites.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.ListInvites.g.cs deleted file mode 100644 index c37b537..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.ListInvites.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListInvitesSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListInvitesSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListInvitesSecurityRequirement0, - }; - partial void PrepareListInvitesArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListInvitesRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListInvitesResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListInvitesResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Invites
- /// List outstanding invites for the current workspace. Invite tokens are redacted. - ///
- /// 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 ListInvitesAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListInvitesArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListInvitesSecurityRequirements, - operationName: "ListInvitesAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current/invites", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListInvitesRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListInvites", - methodName: "ListInvitesAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListInvites", - methodName: "ListInvitesAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListInvites", - methodName: "ListInvitesAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.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); - ProcessListInvitesResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListInvites", - methodName: "ListInvitesAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListInvites", - methodName: "ListInvitesAsync", - pathTemplate: "\"/v1/tenants/current/invites\"", - 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); - ProcessListInvitesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsInvitesListResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsInvitesListResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.ListMembers.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.ListMembers.g.cs deleted file mode 100644 index 3a4f679..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.ListMembers.g.cs +++ /dev/null @@ -1,376 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_ListMembersSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListMembersSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_ListMembersSecurityRequirement0, - }; - partial void PrepareListMembersArguments( - global::System.Net.Http.HttpClient httpClient); - partial void PrepareListMembersRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessListMembersResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessListMembersResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// List Members
- /// List every member of the current workspace. Any member may call this. - ///
- /// 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 ListMembersAsync( - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareListMembersArguments( - httpClient: HttpClient); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_ListMembersSecurityRequirements, - operationName: "ListMembersAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current/members", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareListMembersRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMembers", - methodName: "ListMembersAsync", - pathTemplate: "\"/v1/tenants/current/members\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMembers", - methodName: "ListMembersAsync", - pathTemplate: "\"/v1/tenants/current/members\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMembers", - methodName: "ListMembersAsync", - pathTemplate: "\"/v1/tenants/current/members\"", - 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::Speechify.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); - ProcessListMembersResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMembers", - methodName: "ListMembersAsync", - pathTemplate: "\"/v1/tenants/current/members\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListMembers", - methodName: "ListMembersAsync", - pathTemplate: "\"/v1/tenants/current/members\"", - 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); - ProcessListMembersResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsMembersListResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsMembersListResponse.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.PreviewInvite.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.PreviewInvite.g.cs deleted file mode 100644 index 5d4e79c..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.PreviewInvite.g.cs +++ /dev/null @@ -1,389 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_PreviewInviteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_PreviewInviteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_PreviewInviteSecurityRequirement0, - }; - partial void PreparePreviewInviteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string token); - partial void PreparePreviewInviteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string token); - partial void ProcessPreviewInviteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessPreviewInviteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Preview Invite
- /// Preview a workspace invite without authenticating. Returns the
- /// workspace name, inviter details, and expiry so the `/join/{token}`
- /// page can render before the recipient signs in. Anyone with the
- /// token can already accept, so this endpoint deliberately surfaces
- /// the same information a caller would see after accepting. Invalid
- /// tokens (unknown, expired, revoked, already-accepted, or pointing
- /// at a soft-deleted workspace) collapse to a single 404 to prevent
- /// enumeration. - ///
- /// - /// 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 PreviewInviteAsync( - string token, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PreparePreviewInviteArguments( - httpClient: HttpClient, - token: ref token); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_PreviewInviteSecurityRequirements, - operationName: "PreviewInviteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/invites/{token}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PreparePreviewInviteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - token: token!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "PreviewInvite", - methodName: "PreviewInviteAsync", - pathTemplate: "$\"/v1/invites/{token}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "PreviewInvite", - methodName: "PreviewInviteAsync", - pathTemplate: "$\"/v1/invites/{token}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "PreviewInvite", - methodName: "PreviewInviteAsync", - pathTemplate: "$\"/v1/invites/{token}\"", - 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::Speechify.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); - ProcessPreviewInviteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "PreviewInvite", - methodName: "PreviewInviteAsync", - pathTemplate: "$\"/v1/invites/{token}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "PreviewInvite", - methodName: "PreviewInviteAsync", - pathTemplate: "$\"/v1/invites/{token}\"", - 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); - ProcessPreviewInviteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsInvitePreview.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsInvitePreview.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.RemoveMember.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.RemoveMember.g.cs deleted file mode 100644 index 0db15cf..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.RemoveMember.g.cs +++ /dev/null @@ -1,363 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_RemoveMemberSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_RemoveMemberSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_RemoveMemberSecurityRequirement0, - }; - partial void PrepareRemoveMemberArguments( - global::System.Net.Http.HttpClient httpClient, - ref string userUid); - partial void PrepareRemoveMemberRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string userUid); - partial void ProcessRemoveMemberResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Remove Member
- /// Remove a member from the current workspace. Owner or admin
- /// only. The caller cannot remove themselves — use
- /// `POST /v1/tenants/current/members/leave` instead. - ///
- /// - /// 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 RemoveMemberAsync( - string userUid, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareRemoveMemberArguments( - httpClient: HttpClient, - userUid: ref userUid); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_RemoveMemberSecurityRequirements, - operationName: "RemoveMemberAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tenants/current/members/{userUid}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareRemoveMemberRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - userUid: userUid!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RemoveMember", - methodName: "RemoveMemberAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RemoveMember", - methodName: "RemoveMemberAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RemoveMember", - methodName: "RemoveMemberAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.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); - ProcessRemoveMemberResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RemoveMember", - methodName: "RemoveMemberAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RemoveMember", - methodName: "RemoveMemberAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.RevokeInvite.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.RevokeInvite.g.cs deleted file mode 100644 index 8a26aee..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.RevokeInvite.g.cs +++ /dev/null @@ -1,361 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_RevokeInviteSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_RevokeInviteSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_RevokeInviteSecurityRequirement0, - }; - partial void PrepareRevokeInviteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id); - partial void PrepareRevokeInviteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id); - partial void ProcessRevokeInviteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Revoke Invite
- /// Revoke an outstanding invite. Owner or admin only. Idempotent. - ///
- /// - /// 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 RevokeInviteAsync( - string id, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareRevokeInviteArguments( - httpClient: HttpClient, - id: ref id); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_RevokeInviteSecurityRequirements, - operationName: "RevokeInviteAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tenants/current/invites/{id}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareRevokeInviteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id!); - - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RevokeInvite", - methodName: "RevokeInviteAsync", - pathTemplate: "$\"/v1/tenants/current/invites/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RevokeInvite", - methodName: "RevokeInviteAsync", - pathTemplate: "$\"/v1/tenants/current/invites/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RevokeInvite", - methodName: "RevokeInviteAsync", - pathTemplate: "$\"/v1/tenants/current/invites/{id}\"", - 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::Speechify.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); - ProcessRevokeInviteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RevokeInvite", - methodName: "RevokeInviteAsync", - pathTemplate: "$\"/v1/tenants/current/invites/{id}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "RevokeInvite", - methodName: "RevokeInviteAsync", - pathTemplate: "$\"/v1/tenants/current/invites/{id}\"", - 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::Speechify.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::Speechify.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/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.TransferWorkspaceOwner.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.TransferWorkspaceOwner.g.cs deleted file mode 100644 index f7b1463..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.TransferWorkspaceOwner.g.cs +++ /dev/null @@ -1,409 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_TransferWorkspaceOwnerSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_TransferWorkspaceOwnerSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_TransferWorkspaceOwnerSecurityRequirement0, - }; - partial void PrepareTransferWorkspaceOwnerArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsTransferOwnershipRequest request); - partial void PrepareTransferWorkspaceOwnerRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsTransferOwnershipRequest request); - partial void ProcessTransferWorkspaceOwnerResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - /// - /// Transfer Workspace Owner
- /// Transfer ownership of the current workspace atomically. Promotes
- /// the target member to owner and demotes the caller to admin in a
- /// single transaction. Owner-only; admins cannot hand off a role
- /// they were never granted. Prefer this over two PATCH calls to
- /// `/v1/tenants/current/members/{user_uid}`: a sole-owner caller
- /// cannot demote themselves first without tripping the last-owner
- /// guard, which this endpoint sidesteps by promoting before
- /// demoting. - ///
- /// - /// 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 TransferWorkspaceOwnerAsync( - - global::Speechify.TtsTransferOwnershipRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareTransferWorkspaceOwnerArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_TransferWorkspaceOwnerSecurityRequirements, - operationName: "TransferWorkspaceOwnerAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current/transfer-owner", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareTransferWorkspaceOwnerRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "TransferWorkspaceOwner", - methodName: "TransferWorkspaceOwnerAsync", - pathTemplate: "\"/v1/tenants/current/transfer-owner\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "TransferWorkspaceOwner", - methodName: "TransferWorkspaceOwnerAsync", - pathTemplate: "\"/v1/tenants/current/transfer-owner\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "TransferWorkspaceOwner", - methodName: "TransferWorkspaceOwnerAsync", - pathTemplate: "\"/v1/tenants/current/transfer-owner\"", - 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::Speechify.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); - ProcessTransferWorkspaceOwnerResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "TransferWorkspaceOwner", - methodName: "TransferWorkspaceOwnerAsync", - pathTemplate: "\"/v1/tenants/current/transfer-owner\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "TransferWorkspaceOwner", - methodName: "TransferWorkspaceOwnerAsync", - pathTemplate: "\"/v1/tenants/current/transfer-owner\"", - 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); - - try - { - __response.EnsureSuccessStatusCode(); - - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.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(); - } - } - /// - /// Transfer Workspace Owner
- /// Transfer ownership of the current workspace atomically. Promotes
- /// the target member to owner and demotes the caller to admin in a
- /// single transaction. Owner-only; admins cannot hand off a role
- /// they were never granted. Prefer this over two PATCH calls to
- /// `/v1/tenants/current/members/{user_uid}`: a sole-owner caller
- /// cannot demote themselves first without tripping the last-owner
- /// guard, which this endpoint sidesteps by promoting before
- /// demoting. - ///
- /// - /// Firebase UID of the member who will become the new owner. - /// - /// 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 TransferWorkspaceOwnerAsync( - string userUid, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsTransferOwnershipRequest - { - UserUid = userUid, - }; - - await TransferWorkspaceOwnerAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.UpdateCurrent.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.UpdateCurrent.g.cs deleted file mode 100644 index eb9c962..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.UpdateCurrent.g.cs +++ /dev/null @@ -1,416 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateCurrentSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateCurrentSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateCurrentSecurityRequirement0, - }; - partial void PrepareUpdateCurrentArguments( - global::System.Net.Http.HttpClient httpClient, - global::Speechify.TtsUpdateWorkspaceRequest request); - partial void PrepareUpdateCurrentRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Speechify.TtsUpdateWorkspaceRequest request); - partial void ProcessUpdateCurrentResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateCurrentResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Current
- /// Rename the current workspace. Owner or admin only. - ///
- /// - /// 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 UpdateCurrentAsync( - - global::Speechify.TtsUpdateWorkspaceRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateCurrentArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateCurrentSecurityRequirements, - operationName: "UpdateCurrentAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: "/v1/tenants/current", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateCurrentRequest( - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateCurrent", - methodName: "UpdateCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateCurrent", - methodName: "UpdateCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateCurrent", - methodName: "UpdateCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.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); - ProcessUpdateCurrentResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateCurrent", - methodName: "UpdateCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateCurrent", - methodName: "UpdateCurrentAsync", - pathTemplate: "\"/v1/tenants/current\"", - 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); - ProcessUpdateCurrentResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsTenant.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsTenant.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update Current
- /// Rename the current workspace. Owner or admin only. - ///
- /// - /// New display name. Required; must be 120 characters or fewer. - /// - /// 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 UpdateCurrentAsync( - string name, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateWorkspaceRequest - { - Name = name, - }; - - return await UpdateCurrentAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.UpdateMemberRole.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.UpdateMemberRole.g.cs deleted file mode 100644 index a45bb36..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.UpdateMemberRole.g.cs +++ /dev/null @@ -1,432 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - public partial class SubpackageTtsSubpackageTtsWorkspacesClient - { - - - private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateMemberRoleSecurityRequirement0 = - new global::Speechify.EndPointSecurityRequirement - { - Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] - { new global::Speechify.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "HttpBearer", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UpdateMemberRoleSecurityRequirements = - new global::Speechify.EndPointSecurityRequirement[] - { s_UpdateMemberRoleSecurityRequirement0, - }; - partial void PrepareUpdateMemberRoleArguments( - global::System.Net.Http.HttpClient httpClient, - ref string userUid, - global::Speechify.TtsUpdateMemberRoleRequest request); - partial void PrepareUpdateMemberRoleRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string userUid, - global::Speechify.TtsUpdateMemberRoleRequest request); - partial void ProcessUpdateMemberRoleResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessUpdateMemberRoleResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Member Role
- /// Change a member's role. Owner only — admins may add or remove
- /// members but may not change roles. Refused with 409 when
- /// demoting the last remaining owner. - ///
- /// - /// - /// 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 UpdateMemberRoleAsync( - string userUid, - - global::Speechify.TtsUpdateMemberRoleRequest request, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareUpdateMemberRoleArguments( - httpClient: HttpClient, - userUid: ref userUid, - request: request); - - - var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_UpdateMemberRoleSecurityRequirements, - operationName: "UpdateMemberRoleAsync"); - - using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/tenants/current/members/{userUid}", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Speechify.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::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareUpdateMemberRoleRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - userUid: userUid!, - 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::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateMemberRole", - methodName: "UpdateMemberRoleAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateMemberRole", - methodName: "UpdateMemberRoleAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateMemberRole", - methodName: "UpdateMemberRoleAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.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); - ProcessUpdateMemberRoleResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateMemberRole", - methodName: "UpdateMemberRoleAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UpdateMemberRole", - methodName: "UpdateMemberRoleAsync", - pathTemplate: "$\"/v1/tenants/current/members/{userUid}\"", - 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); - ProcessUpdateMemberRoleResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Speechify.TtsMember.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Speechify.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::Speechify.TtsMember.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::Speechify.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Update Member Role
- /// Change a member's role. Owner only — admins may add or remove
- /// members but may not change roles. Refused with 409 when
- /// demoting the last remaining owner. - ///
- /// - /// - /// Member's role within the workspace.
- /// - `owner` - Full control, including deleting the workspace.
- /// - `admin` - Manage members and invites; cannot change roles.
- /// - `member` - Standard access, no administrative rights. - /// - /// 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 UpdateMemberRoleAsync( - string userUid, - global::Speechify.TtsMemberRole role, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Speechify.TtsUpdateMemberRoleRequest - { - Role = role, - }; - - return await UpdateMemberRoleAsync( - userUid: userUid, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.g.cs b/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.g.cs deleted file mode 100644 index b5f8355..0000000 --- a/src/libs/Speechify/Generated/Speechify.SubpackageTtsSubpackageTtsWorkspacesClient.g.cs +++ /dev/null @@ -1,115 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// 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 SubpackageTtsSubpackageTtsWorkspacesClient : global::Speechify.ISubpackageTtsSubpackageTtsWorkspacesClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.speechify.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::Speechify.AutoSDKClientOptions Options { get; } - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Speechify.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the SubpackageTtsSubpackageTtsWorkspacesClient. - /// 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 SubpackageTtsSubpackageTtsWorkspacesClient( - 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 SubpackageTtsSubpackageTtsWorkspacesClient. - /// 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 SubpackageTtsSubpackageTtsWorkspacesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Speechify.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::Speechify.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/Speechify/openapi.yaml b/src/libs/Speechify/openapi.yaml index b6139d6..4623e96 100644 --- a/src/libs/Speechify/openapi.yaml +++ b/src/libs/Speechify/openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v1/audio/speech":{"post":{"operationId":"speech","summary":"Speech","description":"Gets the speech data for the given input","tags":["subpackage_tts.subpackage_tts/audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:GetSpeechResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:GetSpeechRequest"}}}}}},"/v1/audio/stream":{"post":{"operationId":"stream","summary":"Stream","description":"Gets the stream speech for the given input","tags":["subpackage_tts.subpackage_tts/audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"schema":{"$ref":"#/components/schemas/tts:V1AudioStreamPostParametersAccept"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:audio_stream_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:GetStreamRequest"}}}}}},"/v1/auth/token":{"post":{"operationId":"create-access-token","summary":"Create Access Token","description":"WARNING: This endpoint is deprecated. Create a new API token for the logged in user.","tags":["subpackage_tts.subpackage_tts/auth"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Contains the details of the token which can be used by the user to access the API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AccessToken"}}}},"400":{"description":"Contains the details of the error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:OAuthError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateAccessTokenRequest"}}}}}},"/v1/voices":{"get":{"operationId":"list","summary":"List","description":"Gets the list of voices available for the user","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tts:GetVoice"}}}}}}},"post":{"operationId":"create","summary":"Create","description":"Create a personal (cloned) voice for the user","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A created voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreatedVoice"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the personal voice"},"locale":{"type":"string","default":"en-US","description":"Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)"},"gender":{"$ref":"#/components/schemas/tts:V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender","description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnotSpecified GenderNotSpecified"},"sample":{"type":"string","format":"binary","description":"Audio sample file"},"avatar":{"type":"string","format":"binary","description":"Avatar image file"},"consent":{"type":"string","description":"A **string** representing the user consent information in JSON format\nThis should include the fullName and email of the consenting individual.\nFor example, `{\"fullName\": \"John Doe\", \"email\": \"john@example.com\"}`"}},"required":["name","gender","sample","consent"]}}}}}},"/v1/voices/{id}":{"delete":{"operationId":"delete","summary":"Delete","description":"Delete a personal (cloned) voice","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to delete","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/voices/{id}/sample":{"get":{"operationId":"download-sample","summary":"Download Sample","description":"Download a personal (cloned) voice sample","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to download sample for","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice sample audio file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}}},"/v1/agents":{"get":{"operationId":"list","summary":"List","description":"List voice agents owned by the caller.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voice agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListAgentsResponse"}}}}}},"post":{"operationId":"create","summary":"Create","description":"Create a voice agent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Agent"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateAgentRequest"}}}}}},"/v1/agents/{id}":{"get":{"operationId":"get","summary":"Get","description":"Retrieve a voice agent by ID.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Agent"}}}}}},"delete":{"operationId":"delete","summary":"Delete","description":"Delete a voice agent. Conversations and attached tools remain.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update","summary":"Update","description":"Update a voice agent. Only fields present on the request body are changed.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Agent"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateAgentRequest"}}}}}},"/v1/agents/{id}/tools":{"get":{"operationId":"list-tools","summary":"List Tools","description":"List tools currently attached to the agent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Attached tools for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListToolsResponse"}}}}}}},"/v1/agents/{id}/tools/{toolId}":{"post":{"operationId":"attach-tool","summary":"Attach Tool","description":"Attach an existing tool to the agent so the LLM can call it.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"delete":{"operationId":"detach-tool","summary":"Detach Tool","description":"Detach a tool from the agent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/agents/{id}/evaluation-config":{"get":{"operationId":"get-evaluation-config","summary":"Get Evaluation Config","description":"Retrieve the agent's post-call evaluation criteria + data-collection config.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The evaluation config for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:EvaluationConfig"}}}}}},"patch":{"operationId":"update-evaluation-config","summary":"Update Evaluation Config","description":"Replace the agent's evaluation criteria + data-collection fields.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated evaluation config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:EvaluationConfig"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateEvaluationConfigRequest"}}}}}},"/v1/agents/{id}/variables":{"get":{"operationId":"get-dynamic-variables","summary":"Get Dynamic Variables","description":"Retrieve the agent's customer-scope dynamic variables and the read-only\ncatalogue of reserved `system__*` keys. The system variables list is\nprovided so editor UIs can render the reference list without maintaining\na client-side copy of the catalogue.\n","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListDynamicVariablesResponse"}}}}}},"patch":{"operationId":"update-dynamic-variables","summary":"Update Dynamic Variables","description":"Replace the agent's customer-scope dynamic variable definitions.\nThe supplied list overwrites the stored list wholesale (same\nsemantics as `updateEvaluationConfig`). Pass an empty array to\nclear all variables. Up to 20 variables per agent. Keys must\nmatch `[a-zA-Z0-9_]+` and must not start with the reserved\n`system__` prefix.\n","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListDynamicVariablesResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateDynamicVariablesRequest"}}}}}},"/v1/agents/{id}/conversations":{"post":{"operationId":"create-conversation","summary":"Create Conversation","description":"Start a new voice conversation with the agent. Returns a realtime\nvoice session + short-lived client token so the caller can\nconnect the audio pipeline directly. The agent is dispatched\nserver-side; no additional client action required.\n\nPass `dynamic_variables` to supply per-session values that override\nthe agent's stored variable defaults for this one conversation.\nKeys in the `system__` namespace are rejected at this boundary.\n","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created conversation with its realtime session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateConversationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateConversationRequest"}}}}}},"/v1/agents/{id}/sessions":{"post":{"operationId":"create-session","summary":"Create Session","description":"Mint a realtime voice session for the given agent. Widget-friendly\ncounterpart to `createConversation` — same response shape, dual\nauthentication:\n\n* **Authenticated (Bearer)**: works for any agent the caller\n owns. Typical server-to-server flow where the embedding\n site's backend mints a token and hands it to the browser so\n the API key never reaches the client.\n* **Unauthenticated**: works only when `agent.is_public = true`\n AND the request's `Origin` header matches `agent.allowed_origins`\n (or that list is empty). When `agent.hostname_allowlist` is\n non-empty, the `Origin` hostname must additionally be a\n member of that list. Used directly by the\n `` web component.\n\nResponds with the same `CreateConversationResponse` as\n`createConversation`.\n","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The created session with its realtime token + URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateConversationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateSessionRequest"}}}}}},"/v1/agents/{id}/knowledge-bases":{"get":{"operationId":"list-agent-knowledge-bases","summary":"List Agent Knowledge Bases","description":"List knowledge bases attached to an agent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The knowledge bases attached to the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListKnowledgeBasesResponse"}}}}}}},"/v1/agents/{id}/knowledge-bases/{kbId}":{"post":{"operationId":"attach-knowledge-base","summary":"Attach Knowledge Base","description":"Attach a knowledge base to an agent. The `search_knowledge` tool\nis auto-registered on the next conversation and can only query the\nattached knowledge bases.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kbId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"delete":{"operationId":"detach-knowledge-base","summary":"Detach Knowledge Base","description":"Detach a knowledge base from an agent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kbId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/agents/{id}/memories":{"get":{"operationId":"list-memories","summary":"List Memories","description":"List per-caller memories extracted for an agent. Memories are\nwritten post-call by the built-in extractor when `memory_enabled`\nis true on the agent; the list is sorted newest-first.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum rows to return. Defaults to 100, capped at 200.","required":false,"schema":{"type":"integer","default":100}},{"name":"offset","in":"query","description":"Number of rows to skip. Combine with `limit` to page through older memories.","required":false,"schema":{"type":"integer","default":0}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Memories for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListMemoriesResponse"}}}}}}},"/v1/agents/{id}/memories/delete-by-caller":{"post":{"operationId":"delete-memories-by-caller","summary":"Delete Memories By Caller","description":"Delete every memory ever extracted for a specific caller on\nthis agent. Privacy / GDPR surface. Returns the count of rows\nsoft-deleted; rows become permanently unreachable immediately\nand are hard-deleted by the retention job after the tenant's\nconfigured retention window.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:DeleteMemoriesByCallerResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:DeleteMemoriesByCallerRequest"}}}}}},"/v1/agents/{id}/tests":{"get":{"operationId":"list-tests","summary":"List Tests","description":"List all tests configured for the agent. Each entry includes the\nmost recent run so the console can render pass/fail badges without\nan extra round-trip.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tests for the agent with last-run summaries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListAgentTestsResponse"}}}}}},"post":{"operationId":"create-test","summary":"Create Test","description":"Create a new test for the agent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTest"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateAgentTestRequest"}}}}}},"/v1/agents/{id}/tests/runs":{"post":{"operationId":"run-all-tests","summary":"Run All Tests","description":"Enqueue runs for every test on the agent concurrently. Up to 50\ntests are dispatched in one call. Each returned run starts in\n`queued` status; poll `GET /v1/test-runs/{id}` for the terminal\nresult.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Queued runs for all tests on the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:RunAgentTestsResponse"}}}}}}},"/v1/tests/{id}":{"get":{"operationId":"get-test","summary":"Get Test","description":"Retrieve a test by ID.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTest"}}}}}},"delete":{"operationId":"delete-test","summary":"Delete Test","description":"Delete a test and all its run history.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update-test","summary":"Update Test","description":"Update a test. Only fields present on the request body are changed.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTest"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateAgentTestRequest"}}}}}},"/v1/tests/{id}/runs":{"get":{"operationId":"list-test-runs","summary":"List Test Runs","description":"List the run history for a test, newest first.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Run history for the test.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListAgentTestRunsResponse"}}}}}},"post":{"operationId":"run-test","summary":"Run Test","description":"Enqueue a single run of the test. The returned run starts in\n`queued` status. Poll `GET /v1/test-runs/{id}` until the status\nreaches a terminal state (`passed`, `failed`, or `error`).","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"The queued run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTestRun"}}}}}}},"/v1/test-runs/{id}":{"get":{"operationId":"get-test-run","summary":"Get Test Run","description":"Retrieve a single test run by ID. Poll this endpoint until\n`status` reaches a terminal state (`passed`, `failed`, or `error`).\nThe `result` field is populated on terminal states.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The test run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTestRun"}}}}}}},"/v1/tests":{"get":{"operationId":"list-all-tests","summary":"List All Tests","description":"Workspace-wide list of tests across every agent the caller owns.\nSupports filters (agent, type, last-run status, folder), full-text\nsearch on name/description, and cursor pagination. Each row carries\nits newest run and attached agent IDs so the list renders without\nN+1 round-trips.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"agent_id","in":"query","description":"Comma-separated agent IDs to filter on.","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Comma-separated test types (scenario|tool|simulation).","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Comma-separated last-run statuses.","required":false,"schema":{"type":"string"}},{"name":"folder_id","in":"query","description":"Folder ID to filter on, or \"root\" for unfiled tests.","required":false,"schema":{"type":"string"}},{"name":"updated_after","in":"query","description":"Only return tests updated after this RFC3339 timestamp.","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Substring match on name or description.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max tests per page (default 50, max 200).","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListTestsResponse"}}}}}}},"/v1/tests/stats":{"get":{"operationId":"get-test-stats","summary":"Get Test Stats","description":"Aggregate pass-rate metrics over the last N days. Returns dense\ndaily buckets (one entry per day, zero-filled) plus totals and a\nper-type breakdown. Powers the header chart on the global tests\npage. Default window is 30 days, max 90.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"window_days","in":"query","description":"Trailing window in days (default 30, max 90).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stats payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:TestStats"}}}}}}},"/v1/tests/runs:batch":{"post":{"operationId":"run-tests-batch","summary":"Run Tests Batch","description":"Queue runs for every (test, agent) pair in the body. Entries\nwithout an `agent_id` fan out to every agent the test is\nattached to. Total expanded runs are capped at 100 per call.\nEach entry in the response is a queued run; poll\n`GET /v1/test-runs/{id}` for each.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Runs queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:RunBatchResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:RunBatchRequest"}}}}}},"/v1/tests/{id}/attachments":{"get":{"operationId":"list-test-attachments","summary":"List Test Attachments","description":"List every agent a test is attached to.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Attachment list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListAgentTestAttachmentsResponse"}}}}}}},"/v1/tests/{id}/attachments/{agentId}":{"post":{"operationId":"attach-test","summary":"Attach Test","description":"Attach a test to an additional agent. After this call, the test\nwill also run as part of that agent's regression suite (and\nagainst its prompt + tool config when invoked with\n`agent_id = {agentId}`). Idempotent.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"delete":{"operationId":"detach-test","summary":"Detach Test","description":"Detach a test from an agent. The owner agent (the agent the test\nwas authored against) cannot be detached; delete the test\ninstead.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"agentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/tests/{id}/move":{"post":{"operationId":"move-test","summary":"Move Test","description":"Move a test into a folder. Pass `folder_id: null` for root.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:MoveAgentTestRequest"}}}}}},"/v1/test-folders":{"get":{"operationId":"list-test-folders","summary":"List Test Folders","description":"List every test folder the caller owns. Flat list; build the tree client-side.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Folder list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListAgentTestFoldersResponse"}}}}}},"post":{"operationId":"create-test-folder","summary":"Create Test Folder","description":"Create a test folder. Max depth is 3.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Created folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTestFolder"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateAgentTestFolderRequest"}}}}}},"/v1/test-folders/{id}":{"delete":{"operationId":"delete-test-folder","summary":"Delete Test Folder","description":"Soft-delete a folder. Child tests drop back to root.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update-test-folder","summary":"Update Test Folder","description":"Rename or reparent a test folder. Cycles are rejected.","tags":["subpackage_tts.subpackage_tts/agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:AgentTestFolder"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateAgentTestFolderRequest"}}}}}},"/v1/tools":{"get":{"operationId":"list","summary":"List","description":"List tools owned by the caller.","tags":["subpackage_tts.subpackage_tts/tools"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListToolsResponse"}}}}}},"post":{"operationId":"create","summary":"Create","description":"Create a tool. For webhook tools, the response includes the HMAC\n`webhook_secret` exactly once — store it immediately; subsequent\nreads return a masked placeholder.\n","tags":["subpackage_tts.subpackage_tts/tools"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tool"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateToolRequest"}}}}}},"/v1/tools/{id}":{"get":{"operationId":"get","summary":"Get","description":"Retrieve a tool by ID. Webhook secrets are always masked here.","tags":["subpackage_tts.subpackage_tts/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tool"}}}}}},"delete":{"operationId":"delete","summary":"Delete","description":"Delete a tool. Agents that had it attached get a soft-detach.","tags":["subpackage_tts.subpackage_tts/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update","summary":"Update","description":"Update a tool. Tool kind is immutable — create a new tool to change it.","tags":["subpackage_tts.subpackage_tts/tools"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tool"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateToolRequest"}}}}}},"/v1/conversations":{"get":{"operationId":"list","summary":"List","description":"List conversations owned by the caller, ordered by most recent.","tags":["subpackage_tts.subpackage_tts/conversations"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListConversationsResponse"}}}}}}},"/v1/conversations/{id}":{"get":{"operationId":"get","summary":"Get","description":"Retrieve a conversation by ID.","tags":["subpackage_tts.subpackage_tts/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Conversation"}}}}}}},"/v1/conversations/{id}/messages":{"get":{"operationId":"list-messages","summary":"List Messages","description":"Retrieve the full transcript for a conversation, in order.","tags":["subpackage_tts.subpackage_tts/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The messages for the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListMessagesResponse"}}}}}}},"/v1/conversations/{id}/evaluations":{"get":{"operationId":"list-evaluations","summary":"List Evaluations","description":"Retrieve post-call evaluation results for a conversation.","tags":["subpackage_tts.subpackage_tts/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The evaluations for the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListEvaluationsResponse"}}}}}}},"/v1/conversations/{id}/memories":{"get":{"operationId":"list-memories","summary":"List Memories","description":"List memories extracted from a specific conversation.","tags":["subpackage_tts.subpackage_tts/conversations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Memories written during this conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListMemoriesResponse"}}}}}}},"/v1/knowledge-bases":{"get":{"operationId":"list","summary":"List","description":"List knowledge bases owned by the caller.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The knowledge bases for the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListKnowledgeBasesResponse"}}}}}},"post":{"operationId":"create","summary":"Create","description":"Create a new knowledge base.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:KnowledgeBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateKnowledgeBaseRequest"}}}}}},"/v1/knowledge-bases/{id}":{"get":{"operationId":"get","summary":"Get","description":"Retrieve a knowledge base by ID.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:KnowledgeBase"}}}}}},"delete":{"operationId":"delete","summary":"Delete","description":"Soft-delete a knowledge base. Documents and chunks are cascaded.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update","summary":"Update","description":"Update a knowledge base.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:KnowledgeBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateKnowledgeBaseRequest"}}}}}},"/v1/knowledge-bases/{id}/documents":{"get":{"operationId":"list-documents","summary":"List Documents","description":"List documents ingested into a knowledge base.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The documents in the knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListKnowledgeBaseDocumentsResponse"}}}}}},"post":{"operationId":"upload-document","summary":"Upload Document","description":"Upload a document (PDF, plain text, markdown, or HTML) to a\nknowledge base. The document is extracted, chunked, embedded, and\nindexed synchronously; expect a few seconds per MB of input.\nMaximum 10 MB per upload.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The ingested document record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:KnowledgeBaseDocument"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}}}},"/v1/knowledge-bases/documents/{docId}":{"get":{"operationId":"get-document","summary":"Get Document","description":"Retrieve a document by ID.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The document record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:KnowledgeBaseDocument"}}}}}},"delete":{"operationId":"delete-document","summary":"Delete Document","description":"Delete a document and all its chunks.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/knowledge-bases/documents/{docId}/chunks":{"get":{"operationId":"list-chunks","summary":"List Chunks","description":"List the chunks for a document.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The chunks for the document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:ListKnowledgeBaseChunksResponse"}}}}}}},"/v1/knowledge-bases/search":{"post":{"operationId":"search","summary":"Search","description":"Semantic search across a caller-owned list of knowledge bases.\nReturns ranked chunks with source filename and a cosine-similarity\nscore. Limited to 50 results per request.","tags":["subpackage_tts.subpackage_tts/knowledgeBases"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ranked search hits across the selected knowledge bases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:SearchKnowledgeBasesResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:SearchKnowledgeBasesRequest"}}}}}},"/v1/memories/{memoryId}":{"delete":{"operationId":"delete","summary":"Delete","description":"Soft-delete one memory row.","tags":["subpackage_tts.subpackage_tts/memories"],"parameters":[{"name":"memoryId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/phone-numbers":{"get":{"operationId":"list","summary":"List","description":"List all phone numbers in the caller's workspace.","tags":["subpackage_tts.subpackage_tts/phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The phone numbers for the workspace.","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"post":{"operationId":"import","summary":"Import","description":"Import a phone number into the workspace. The `source` field\ndetermines the provisioning path:\n\n- `livekit` - LiveKit purchases the number on your behalf. US\n inbound only. Quickest path for local testing.\n- `twilio` - Provide your Twilio Account SID, Auth Token, and\n the E.164 number you already own. We provision an Elastic SIP\n Trunk on your Twilio account automatically.\n- `byoc` - Provide an existing SIP trunk ID. The number is\n registered against that trunk.\n\nReturns 402 when the workspace has reached the 100-number cap.\n","tags":["subpackage_tts.subpackage_tts/phoneNumbers"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The imported phone number.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"Any type"}}}}}},"/v1/phone-numbers/{id}":{"get":{"operationId":"get","summary":"Get","description":"Retrieve a phone number by ID.","tags":["subpackage_tts.subpackage_tts/phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested phone number.","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"delete":{"operationId":"delete","summary":"Delete","description":"Delete a phone number from the workspace. For Twilio and LiveKit\nnumbers this also deprovisions the backing SIP trunk and dispatch\nrule on LiveKit Cloud.\n","tags":["subpackage_tts.subpackage_tts/phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update","summary":"Update","description":"Update a phone number. Only `label` and `agent_id` are mutable;\n`source` and `e164` are immutable after import. Pass `null` for\n`agent_id` to unbind the number from its current agent.\n","tags":["subpackage_tts.subpackage_tts/phoneNumbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated phone number.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"Any type"}}}}}},"/v1/sip-trunks":{"get":{"operationId":"list","summary":"List","description":"List all SIP trunks in the caller's workspace.","tags":["subpackage_tts.subpackage_tts/sipTrunks"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The SIP trunks for the workspace.","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"post":{"operationId":"create","summary":"Create","description":"Create a SIP trunk. For `kind=byoc` supply `sip_address` plus\noptional digest credentials and IP allowlist. For `kind=twilio`\nuse `ImportPhoneNumber` with a `twilio` spec instead - trunk\ncreation is handled automatically. Returns 402 when the workspace\nhas reached the 20-trunk cap.\n","tags":["subpackage_tts.subpackage_tts/sipTrunks"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created SIP trunk.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"Any type"}}}}}},"/v1/sip-trunks/{id}":{"get":{"operationId":"get","summary":"Get","description":"Retrieve a SIP trunk by ID.","tags":["subpackage_tts.subpackage_tts/sipTrunks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested SIP trunk.","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"delete":{"operationId":"delete","summary":"Delete","description":"Delete a SIP trunk. This also removes the backing LiveKit inbound\ntrunk, outbound trunk, and dispatch rule if they were provisioned\nby us. Phone numbers attached to this trunk are left in place but\nbecome non-functional until rebound to a new trunk.\n","tags":["subpackage_tts.subpackage_tts/sipTrunks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/outbound-calls":{"post":{"operationId":"create","summary":"Create","description":"Place an outbound call from an agent to a phone number. LiveKit\noriginates the SIP INVITE through the outbound trunk bound to the\nagent's workspace; the agent worker is dispatched into the room\nautomatically.\n\nThe response is returned as soon as LiveKit accepts the INVITE.\nPoll `GET /v1/conversations/{conversation_id}` for status\ntransitions: `pending` → `active` (answered) → `completed`.\n\nRequires a Twilio or BYOC trunk. LiveKit-native numbers are\ninbound-only.\n","tags":["subpackage_tts.subpackage_tts/outboundCalls"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The outbound call was accepted by LiveKit.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"content":{"application/json":{"schema":{"description":"Any type"}}}}}},"/v1/tenants":{"get":{"operationId":"list","summary":"List","description":"List every workspace the authenticated user belongs to. Powers the workspace switcher.","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workspaces for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:TenantsListResponse"}}}}}},"post":{"operationId":"create","summary":"Create","description":"Create a new workspace with the authenticated user as owner.\nThe caller must switch their active workspace client-side via\nthe `X-Tenant-ID` header to act on the new tenant.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The newly-created workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tenant"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateWorkspaceRequest"}}}}}},"/v1/tenants/current":{"get":{"operationId":"get-current","summary":"Get Current","description":"Retrieve the workspace currently selected by the caller (via `X-Tenant-ID` or auto-resolved).","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The current workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tenant"}}}}}},"patch":{"operationId":"update-current","summary":"Update Current","description":"Rename the current workspace. Owner or admin only.","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tenant"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateWorkspaceRequest"}}}}}},"/v1/tenants/current/members":{"get":{"operationId":"list-members","summary":"List Members","description":"List every member of the current workspace. Any member may call this.","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Members of the current workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:MembersListResponse"}}}}}}},"/v1/tenants/current/members/leave":{"post":{"operationId":"leave","summary":"Leave","description":"Remove the authenticated caller from the current workspace.\nRefused with 409 when the caller is the last owner — promote\nanother member to owner first.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/tenants/current/members/{user_uid}":{"delete":{"operationId":"remove-member","summary":"Remove Member","description":"Remove a member from the current workspace. Owner or admin\nonly. The caller cannot remove themselves — use\n`POST /v1/tenants/current/members/leave` instead.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"user_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"update-member-role","summary":"Update Member Role","description":"Change a member's role. Owner only — admins may add or remove\nmembers but may not change roles. Refused with 409 when\ndemoting the last remaining owner.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"user_uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Member"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:UpdateMemberRoleRequest"}}}}}},"/v1/tenants/current/invites":{"get":{"operationId":"list-invites","summary":"List Invites","description":"List outstanding invites for the current workspace. Invite tokens are redacted.","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Outstanding invites.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:InvitesListResponse"}}}}}},"post":{"operationId":"create-invite","summary":"Create Invite","description":"Create an invite to the current workspace. Owner or admin only.\nThe response contains the invite token ONCE — subsequent list\ncalls redact it.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created invite (token included).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Invite"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreateInviteRequest"}}}}}},"/v1/tenants/current/invites/{id}":{"delete":{"operationId":"revoke-invite","summary":"Revoke Invite","description":"Revoke an outstanding invite. Owner or admin only. Idempotent.","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/v1/invites/{token}/accept":{"post":{"operationId":"accept-invite","summary":"Accept Invite","description":"Accept a workspace invite. The authenticated caller is joined\nto the invite's workspace as a member. Expired, revoked, or\nalready-accepted tokens return 404 to avoid token enumeration.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The workspace the caller just joined.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Tenant"}}}}}}},"/v1/invites/{token}":{"get":{"operationId":"preview-invite","summary":"Preview Invite","description":"Preview a workspace invite without authenticating. Returns the\nworkspace name, inviter details, and expiry so the `/join/{token}`\npage can render before the recipient signs in. Anyone with the\ntoken can already accept, so this endpoint deliberately surfaces\nthe same information a caller would see after accepting. Invalid\ntokens (unknown, expired, revoked, already-accepted, or pointing\nat a soft-deleted workspace) collapse to a single 404 to prevent\nenumeration.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Preview metadata for a valid, active invite.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:InvitePreview"}}}}}}},"/v1/tenants/current/transfer-owner":{"post":{"operationId":"transfer-workspace-owner","summary":"Transfer Workspace Owner","description":"Transfer ownership of the current workspace atomically. Promotes\nthe target member to owner and demotes the caller to admin in a\nsingle transaction. Owner-only; admins cannot hand off a role\nthey were never granted. Prefer this over two PATCH calls to\n`/v1/tenants/current/members/{user_uid}`: a sole-owner caller\ncannot demote themselves first without tripping the last-owner\nguard, which this endpoint sidesteps by promoting before\ndemoting.\n","tags":["subpackage_tts.subpackage_tts/workspaces"],"parameters":[{"name":"Authorization","in":"header","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:TransferOwnershipRequest"}}}}}}},"servers":[{"url":"https://api.speechify.ai"}],"components":{"schemas":{"tts:GetSpeechRequestAudioFormat":{"type":"string","enum":["wav","mp3","ogg","aac","pcm"],"default":"wav","description":"The format for the output audio. Note, that the current default is \"wav\", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect.","title":"GetSpeechRequestAudioFormat"},"tts:GetSpeechRequestModel":{"type":"string","enum":["simba-base","simba-english","simba-multilingual","simba-turbo"],"default":"simba-english","description":"Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.","title":"GetSpeechRequestModel"},"tts:GetSpeechOptionsRequest":{"type":"object","properties":{"loudness_normalization":{"type":"boolean","default":false,"description":"Determines whether to normalize the audio loudness to a standard level.\nWhen enabled, loudness normalization aligns the audio output to the following standards:\nIntegrated loudness: -14 LUFS\nTrue peak: -2 dBTP\nLoudness range: 7 LU\nIf disabled, the audio loudness will match the original loudness of the selected voice, which may vary significantly and be either too quiet or too loud.\nEnabling loudness normalization can increase latency due to additional processing required for audio level adjustments."},"text_normalization":{"type":"boolean","default":true,"description":"Determines whether to normalize the text. If enabled, it will transform numbers, dates, etc. into words. For example, \"55\" is normalized into \"fifty five\".\nThis can increase latency due to additional processing required for text normalization."}},"description":"GetSpeechOptionsRequest is the wrapper for request parameters to the client","title":"GetSpeechOptionsRequest"},"tts:GetSpeechRequest":{"type":"object","properties":{"audio_format":{"$ref":"#/components/schemas/tts:GetSpeechRequestAudioFormat","description":"The format for the output audio. Note, that the current default is \"wav\", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect."},"input":{"type":"string","description":"Plain text or SSML to be synthesized to speech.\nRefer to https://docs.speechify.ai/docs/api-limits for the input size limits.\nEmotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody"},"language":{"type":"string","description":"Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US.\nPlease refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support."},"model":{"$ref":"#/components/schemas/tts:GetSpeechRequestModel","description":"Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead."},"options":{"$ref":"#/components/schemas/tts:GetSpeechOptionsRequest"},"voice_id":{"type":"string","description":"Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices"}},"required":["input","voice_id"],"description":"GetSpeechRequest is the wrapper for request parameters to the client","title":"GetSpeechRequest"},"tts:GetSpeechResponseAudioFormat":{"type":"string","enum":["wav","mp3","ogg","aac","pcm"],"description":"The format of the audio data","title":"GetSpeechResponseAudioFormat"},"tts:NestedChunk":{"type":"object","properties":{"end":{"type":"integer","format":"int64"},"end_time":{"type":"number","format":"double"},"start":{"type":"integer","format":"int64"},"start_time":{"type":"number","format":"double"},"type":{"type":"string"},"value":{"type":"string"}},"description":"It details the type of segment, its start and end points in the text, and its start and end times in the synthesized speech audio.","title":"NestedChunk"},"tts:SpeechMarks":{"type":"object","properties":{"chunks":{"type":"array","items":{"$ref":"#/components/schemas/tts:NestedChunk"},"description":"Array of NestedChunk, each providing detailed segment information within the synthesized speech."},"end":{"type":"integer","format":"int64"},"end_time":{"type":"number","format":"double"},"start":{"type":"integer","format":"int64"},"start_time":{"type":"number","format":"double"},"type":{"type":"string"},"value":{"type":"string"}},"required":["chunks","end","end_time","start","start_time","type"],"description":"It is used to annotate the audio data with metadata about the synthesis process, like word timing or phoneme details.","title":"SpeechMarks"},"tts:GetSpeechResponse":{"type":"object","properties":{"audio_data":{"type":"string","format":"byte","description":"Synthesized speech audio, Base64-encoded"},"audio_format":{"$ref":"#/components/schemas/tts:GetSpeechResponseAudioFormat","description":"The format of the audio data"},"billable_characters_count":{"type":"integer","format":"int64","description":"The number of billable characters processed in the request."},"speech_marks":{"$ref":"#/components/schemas/tts:SpeechMarks"}},"required":["audio_data","audio_format","billable_characters_count","speech_marks"],"title":"GetSpeechResponse"},"tts:V1AudioStreamPostParametersAccept":{"type":"string","enum":["audio/mpeg","audio/ogg","audio/aac","audio/pcm"],"title":"V1AudioStreamPostParametersAccept"},"tts:GetStreamRequestModel":{"type":"string","enum":["simba-base","simba-english","simba-multilingual","simba-turbo"],"default":"simba-english","description":"Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead.","title":"GetStreamRequestModel"},"tts:GetStreamOptionsRequest":{"type":"object","properties":{"loudness_normalization":{"type":"boolean","default":false,"description":"Determines whether to normalize the audio loudness to a standard level.\nWhen enabled, loudness normalization aligns the audio output to the following standards:\nIntegrated loudness: -14 LUFS\nTrue peak: -2 dBTP\nLoudness range: 7 LU\nIf disabled, the audio loudness will match the original loudness of the selected voice, which may vary significantly and be either too quiet or too loud.\nEnabling loudness normalization can increase latency due to additional processing required for audio level adjustments."},"text_normalization":{"type":"boolean","default":false,"description":"Determines whether to normalize the text. If enabled, it will transform numbers, dates, etc. into words. For example, \"55\" is normalized into \"fifty five\".\nThis can increase latency due to additional processing required for text normalization."}},"description":"GetStreamOptionsRequest is the wrapper for request parameters to the client","title":"GetStreamOptionsRequest"},"tts:GetStreamRequest":{"type":"object","properties":{"input":{"type":"string","description":"Plain text or SSML to be synthesized to speech.\nRefer to https://docs.speechify.ai/docs/api-limits for the input size limits.\nEmotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody"},"language":{"type":"string","description":"Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US.\nPlease refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support."},"model":{"$ref":"#/components/schemas/tts:GetStreamRequestModel","description":"Model used for audio synthesis. `simba-base` and `simba-turbo` are deprecated. Use `simba-english` or `simba-multilingual` instead."},"options":{"$ref":"#/components/schemas/tts:GetStreamOptionsRequest"},"voice_id":{"type":"string","description":"Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices"}},"required":["input","voice_id"],"description":"GetStreamRequest is the wrapper for request parameters to the client","title":"GetStreamRequest"},"tts:audio_stream_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"audio_stream_Response_200"},"tts:CreateAccessTokenRequestGrantType":{"type":"string","enum":["client_credentials"],"description":"in: body","title":"CreateAccessTokenRequestGrantType"},"tts:CreateAccessTokenRequestScope":{"type":"string","enum":["audio:speech","audio:stream","audio:all","voices:read","voices:create","voices:delete","voices:all"],"description":"The scope, or a space-delimited list of scopes the token is requested for\nin: body","title":"CreateAccessTokenRequestScope"},"tts:CreateAccessTokenRequest":{"type":"object","properties":{"grant_type":{"$ref":"#/components/schemas/tts:CreateAccessTokenRequestGrantType","description":"in: body"},"scope":{"$ref":"#/components/schemas/tts:CreateAccessTokenRequestScope","description":"The scope, or a space-delimited list of scopes the token is requested for\nin: body"}},"required":["grant_type"],"title":"CreateAccessTokenRequest"},"tts:AccessTokenScope":{"type":"string","enum":["audio:speech","audio:stream","audio:all","voices:read","voices:create","voices:delete","voices:all"],"description":"The scope, or a space-delimited list of scopes the token is issued for","title":"AccessTokenScope"},"tts:AccessTokenTokenType":{"type":"string","enum":["bearer"],"description":"Token type","title":"AccessTokenTokenType"},"tts:AccessToken":{"type":"object","properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64","description":"Expiration time, in seconds from the issue time"},"scope":{"$ref":"#/components/schemas/tts:AccessTokenScope","description":"The scope, or a space-delimited list of scopes the token is issued for"},"token_type":{"$ref":"#/components/schemas/tts:AccessTokenTokenType","description":"Token type"}},"title":"AccessToken"},"tts:OAuthErrorError":{"type":"string","enum":["invalid_client","unauthorized_client","invalid_request","unsupported_grant_type","invalid_scope"],"title":"OAuthErrorError"},"tts:OAuthError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/tts:OAuthErrorError"},"error_description":{"type":"string"}},"title":"OAuthError"},"tts:GetVoiceGender":{"type":"string","enum":["male","female","notSpecified"],"title":"GetVoiceGender"},"tts:GetVoiceLanguage":{"type":"object","properties":{"locale":{"type":"string"},"preview_audio":{"type":["string","null"]}},"required":["locale"],"title":"GetVoiceLanguage"},"tts:GetVoicesModelName":{"type":"string","enum":["simba-base","simba-english","simba-multilingual","simba-turbo"],"title":"GetVoicesModelName"},"tts:GetVoicesModel":{"type":"object","properties":{"languages":{"type":"array","items":{"$ref":"#/components/schemas/tts:GetVoiceLanguage"}},"name":{"$ref":"#/components/schemas/tts:GetVoicesModelName"}},"required":["languages","name"],"title":"GetVoicesModel"},"tts:GetVoiceType":{"type":"string","enum":["shared","personal"],"title":"GetVoiceType"},"tts:GetVoice":{"type":"object","properties":{"avatar_image":{"type":["string","null"]},"display_name":{"type":"string"},"gender":{"$ref":"#/components/schemas/tts:GetVoiceGender"},"locale":{"type":"string"},"id":{"type":"string"},"models":{"type":"array","items":{"$ref":"#/components/schemas/tts:GetVoicesModel"}},"preview_audio":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"type":{"$ref":"#/components/schemas/tts:GetVoiceType"}},"required":["display_name","gender","locale","id","models","type"],"title":"GetVoice"},"tts:V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender":{"type":"string","enum":["male","female","notSpecified"],"description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnotSpecified GenderNotSpecified","title":"V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender"},"tts:CreatedVoiceGender":{"type":"string","enum":["male","female","notSpecified"],"title":"CreatedVoiceGender"},"tts:CreateVoiceLanguage":{"type":"object","properties":{"locale":{"type":"string"},"preview_audio":{"type":"string"}},"title":"CreateVoiceLanguage"},"tts:CreateVoiceModelName":{"type":"string","enum":["simba-base","simba-english","simba-multilingual","simba-turbo"],"title":"CreateVoiceModelName"},"tts:CreateVoiceModel":{"type":"object","properties":{"languages":{"type":"array","items":{"$ref":"#/components/schemas/tts:CreateVoiceLanguage"}},"name":{"$ref":"#/components/schemas/tts:CreateVoiceModelName"}},"title":"CreateVoiceModel"},"tts:CreatedVoiceType":{"type":"string","enum":["shared","personal"],"title":"CreatedVoiceType"},"tts:CreatedVoice":{"type":"object","properties":{"avatar_image":{"type":["string","null"]},"display_name":{"type":"string"},"gender":{"$ref":"#/components/schemas/tts:CreatedVoiceGender"},"locale":{"type":"string"},"id":{"type":"string"},"models":{"type":"array","items":{"$ref":"#/components/schemas/tts:CreateVoiceModel"}},"type":{"$ref":"#/components/schemas/tts:CreatedVoiceType"}},"required":["display_name","gender","locale","id","models","type"],"title":"CreatedVoice"},"tts:Agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"prompt":{"type":"string"},"first_message":{"type":"string"},"language":{"type":"string","description":"ISO 639-1 code, e.g. 'en'."},"llm_model":{"type":"string","description":"Chat model slug. Leave empty to use the Speechify default."},"voice_id":{"type":"string","description":"Speechify voice slug."},"temperature":{"type":"number","format":"double"},"config":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Free-form agent config JSON (evaluation_config is read via its own endpoint)."},"is_public":{"type":"boolean","description":"When true, the `` web component can start a\nsession against this agent without an API key, subject to\nthe `allowed_origins` allowlist. When false (default), only\nauthenticated callers can start sessions.\n"},"allowed_origins":{"type":"array","items":{"type":"string"},"description":"Exact `Origin` header values (e.g. `https://example.com`)\nthat are allowed to start public sessions. Empty array\nwith `is_public = true` means any origin is accepted —\nintended for open demos. No subdomain wildcards.\n"},"hostname_allowlist":{"type":["array","null"],"items":{"type":"string"},"description":"Optional per-agent hostname allowlist enforced at\nsession-creation time. When set and non-empty, the\n`Origin` header's hostname must be an exact member.\nBare hostnames only — no scheme, port, or path. Up to\n10 entries. Omit (null) or leave empty for no\nenforcement (public agents accept any hostname).\n"},"memory_enabled":{"type":"boolean","description":"When true, the post-call extractor writes durable facts about\neach caller; at conversation-start the retriever injects the\ntop matches into the system prompt via the `{{memory}}`\ntemplate variable. Defaults to false.\n"},"memory_retention_days":{"type":"integer","description":"Maximum age (in days) of memories kept and surfaced to the\nretriever. 0 disables the cap. Defaults to 90.\n"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","language","llm_model","voice_id","temperature","is_public","allowed_origins","memory_enabled","memory_retention_days","created_at","updated_at"],"title":"Agent"},"tts:ListAgentsResponse":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/tts:Agent"}}},"required":["agents"],"title":"ListAgentsResponse"},"tts:CreateAgentRequest":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string","description":"Optional. Server derives slug from name with a random suffix when omitted; if you supply your own, a collision returns 400 'slug already taken'."},"prompt":{"type":"string"},"first_message":{"type":"string","description":"Spoken verbatim at session start — no LLM round trip."},"language":{"type":"string","default":"en"},"llm_model":{"type":"string","description":"Optional chat model slug. Leave empty to use the Speechify default."},"voice_id":{"type":"string","description":"Voice slug from the VMS catalog (see GET /v1/voices). Required — the server rejects writes with an unknown or empty slug."},"temperature":{"type":"number","format":"double"},"config":{"type":"object","additionalProperties":{"description":"Any type"}},"is_public":{"type":"boolean","default":false},"allowed_origins":{"type":"array","items":{"type":"string"}},"hostname_allowlist":{"type":"array","items":{"type":"string"},"description":"Optional per-agent hostname allowlist (see Agent schema)."},"memory_enabled":{"type":"boolean","default":false},"memory_retention_days":{"type":"integer","default":90}},"required":["name","voice_id"],"title":"CreateAgentRequest"},"tts:UpdateAgentRequest":{"type":"object","properties":{"name":{"type":"string"},"prompt":{"type":"string"},"first_message":{"type":"string"},"language":{"type":"string"},"llm_model":{"type":"string"},"voice_id":{"type":"string"},"temperature":{"type":"number","format":"double"},"config":{"type":"object","additionalProperties":{"description":"Any type"}},"is_public":{"type":"boolean"},"allowed_origins":{"type":"array","items":{"type":"string"}},"hostname_allowlist":{"type":"array","items":{"type":"string"},"description":"When supplied, replaces the stored list. Pass an empty\narray to clear enforcement (public agent is open again).\nOmit the field to leave the existing value unchanged.\n"},"memory_enabled":{"type":"boolean"},"memory_retention_days":{"type":"integer"}},"title":"UpdateAgentRequest"},"tts:ToolKind":{"type":"string","enum":["system","webhook","client"],"description":"Where the tool executes.\n- `system`: worker-resident built-in (e.g. end_call, transfer_to_number)\n- `webhook`: worker signs a payload and POSTs it to your URL\n- `client`: worker dispatches to the caller's browser/SDK via data channel\n","title":"ToolKind"},"tts:SystemToolConfigBuiltin":{"type":"string","enum":["end_call","transfer_to_number","transfer_to_agent","play_keypad_touch_tone","skip_turn"],"title":"SystemToolConfigBuiltin"},"tts:ToolParamType":{"type":"string","enum":["string","number","integer","boolean"],"title":"ToolParamType"},"tts:ToolParam":{"type":"object","properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/tts:ToolParamType"},"description":{"type":"string"},"required":{"type":"boolean"},"enum":{"type":"array","items":{"type":"string"}}},"required":["name","type","description","required"],"description":"One argument the LLM can pass when calling the tool. Mirrors the JSON-Schema subset standard function-calling schemas support.","title":"ToolParam"},"tts:SystemToolConfig":{"type":"object","properties":{"builtin":{"$ref":"#/components/schemas/tts:SystemToolConfigBuiltin"},"params":{"type":"array","items":{"$ref":"#/components/schemas/tts:ToolParam"}},"builtin_config":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-builtin extras (e.g. allowed_numbers for transfer_to_number)."}},"required":["builtin"],"description":"Config shape for `kind=system`.","title":"SystemToolConfig"},"tts:WebhookToolConfigMethod":{"type":"string","enum":["POST","GET"],"default":"POST","title":"WebhookToolConfigMethod"},"tts:WebhookToolConfig":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"$ref":"#/components/schemas/tts:WebhookToolConfigMethod"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Static headers sent with every call. `Authorization` and `X-Speechify-Signature` are reserved."},"timeout_ms":{"type":"integer","default":10000,"description":"Per-call timeout in milliseconds."},"params":{"type":"array","items":{"$ref":"#/components/schemas/tts:ToolParam"}}},"required":["url"],"description":"Config shape for `kind=webhook`.","title":"WebhookToolConfig"},"tts:ClientToolConfig":{"type":"object","properties":{"params":{"type":"array","items":{"$ref":"#/components/schemas/tts:ToolParam"}},"timeout_ms":{"type":"integer","default":10000}},"description":"Config shape for `kind=client`. Execution happens in the caller's browser / SDK.","title":"ClientToolConfig"},"tts:ToolConfig":{"oneOf":[{"$ref":"#/components/schemas/tts:SystemToolConfig"},{"$ref":"#/components/schemas/tts:WebhookToolConfig"},{"$ref":"#/components/schemas/tts:ClientToolConfig"}],"description":"One of `SystemToolConfig`, `WebhookToolConfig`, or `ClientToolConfig` depending on `kind`.","title":"ToolConfig"},"tts:Tool":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"kind":{"$ref":"#/components/schemas/tts:ToolKind"},"config":{"$ref":"#/components/schemas/tts:ToolConfig","description":"One of `SystemToolConfig`, `WebhookToolConfig`, or `ClientToolConfig` depending on `kind`."},"webhook_secret":{"type":"string","description":"HMAC signing secret for `kind=webhook`. Returned in full **only** on the create\nresponse; all subsequent reads return a masked placeholder. Store it on first\ncreate — there is no way to retrieve it later.\n"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","kind","config","created_at","updated_at"],"title":"Tool"},"tts:ListToolsResponse":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/tts:Tool"}}},"required":["tools"],"title":"ListToolsResponse"},"tts:EvaluationCriterion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name","description"],"description":"One LLM-scored assertion about the call (\"Did the agent confirm the customer's name?\").","title":"EvaluationCriterion"},"tts:DataCollectionFieldType":{"type":"string","enum":["string","int","number","boolean"],"title":"DataCollectionFieldType"},"tts:DataCollectionField":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/tts:DataCollectionFieldType"}},"required":["key","description","type"],"description":"A structured value the post-call evaluator should extract from the\ntranscript. `int` is distinct from `number` so downstream consumers\nreceive whole integers without a synthetic decimal.\n","title":"DataCollectionField"},"tts:EvaluationConfig":{"type":"object","properties":{"criteria":{"type":"array","items":{"$ref":"#/components/schemas/tts:EvaluationCriterion"}},"data_collection":{"type":"array","items":{"$ref":"#/components/schemas/tts:DataCollectionField"}}},"required":["criteria","data_collection"],"title":"EvaluationConfig"},"tts:UpdateEvaluationConfigRequest":{"type":"object","properties":{"criteria":{"type":"array","items":{"$ref":"#/components/schemas/tts:EvaluationCriterion"}},"data_collection":{"type":"array","items":{"$ref":"#/components/schemas/tts:DataCollectionField"}}},"required":["criteria","data_collection"],"title":"UpdateEvaluationConfigRequest"},"tts:DynamicVariableType":{"type":"string","enum":["string","number","boolean","json"],"description":"Declared type of a customer-scope variable. Enforced at save time\nand again at session-start when an override value is supplied.\n- `string` - plain text value; interpolated verbatim with `{{name}}`\n- `number` - numeric value; rendered as its decimal representation\n- `boolean` - `true` or `false`\n- `json` - any valid JSON value; use `{{name|json}}` to inject\n safely inside JSON tool bodies\n","title":"DynamicVariableType"},"tts:DynamicVariable":{"type":"object","properties":{"key":{"type":"string","description":"Variable name. Must match `[a-zA-Z0-9_]+`. The `system__` prefix\nis reserved for platform-populated variables and will be rejected.\n"},"type":{"$ref":"#/components/schemas/tts:DynamicVariableType"},"default":{"description":"Optional default value used when no per-session override is\nsupplied. Must conform to the declared `type`.\n"},"description":{"type":"string","description":"Human-readable note shown in the console variable editor."}},"required":["key","type"],"description":"One customer-scope variable definition on an agent. Referenced in\nprompts, first messages, and webhook tool configs via `{{key}}` or\n`{{key|json}}`. Missing variables render as empty string at dispatch\ntime - a typo never breaks a session.\n","title":"DynamicVariable"},"tts:SystemVariableDoc":{"type":"object","properties":{"key":{"type":"string","description":"The reserved variable key (always starts with `system__`)."},"description":{"type":"string","description":"What the variable contains and when it is populated."}},"required":["key","description"],"description":"Documents one reserved `system__*` variable that the platform\nauto-populates at session start. Customers cannot define or\noverride these keys.\n","title":"SystemVariableDoc"},"tts:ListDynamicVariablesResponse":{"type":"object","properties":{"variables":{"type":"array","items":{"$ref":"#/components/schemas/tts:DynamicVariable"},"description":"Customer-defined variables for this agent."},"system_variables":{"type":"array","items":{"$ref":"#/components/schemas/tts:SystemVariableDoc"},"description":"Platform-populated `system__*` variables, provided for\nreference. This list is the same for every agent.\n"}},"required":["variables","system_variables"],"description":"Response for `GET /v1/agents/{id}/variables`. Returns both the\ncustomer-scope variable catalogue and the read-only `system__*`\ncatalogue so the editor UI has a single source of truth.\n","title":"ListDynamicVariablesResponse"},"tts:UpdateDynamicVariablesRequest":{"type":"object","properties":{"variables":{"type":"array","items":{"$ref":"#/components/schemas/tts:DynamicVariable"},"description":"The new variable list. Replaces the existing list entirely."}},"required":["variables"],"description":"PATCH body for `PATCH /v1/agents/{id}/variables`. Replaces the\nstored variable list wholesale. Pass an empty array to clear all\nvariables. Up to 20 variables per agent.\n","title":"UpdateDynamicVariablesRequest"},"tts:CreateConversationRequest":{"type":"object","properties":{"transport":{"type":["string","null"],"description":"Transport hint. Omit to use the agent's default."},"dynamic_variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-session variable overrides that merge on top of the agent's\nstored variable defaults for this one conversation. Keys in the\nreserved `system__` namespace are rejected. Values must match the\ndeclared type of the corresponding variable definition on the agent.\n"}},"description":"Optional body for `POST /v1/agents/{id}/conversations`.","title":"CreateConversationRequest"},"tts:ConversationStatus":{"type":"string","enum":["pending","active","completed","failed"],"title":"ConversationStatus"},"tts:ConversationTransport":{"type":"string","enum":["web","sip"],"title":"ConversationTransport"},"tts:Conversation":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"room_name":{"type":"string"},"room_sid":{"type":"string"},"status":{"$ref":"#/components/schemas/tts:ConversationStatus"},"transport":{"$ref":"#/components/schemas/tts:ConversationTransport"},"started_at":{"type":["string","null"],"format":"date-time","description":"Set when the first user participant joins the realtime\nvoice session. Null between CreateConversation and the\nparticipant-joined event, and stays null if no user ever\njoins.\n"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_ms":{"type":["integer","null"]},"cost_cents":{"type":["integer","null"]},"recording_url":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["id","agent_id","room_name","status","transport"],"title":"Conversation"},"tts:CreateConversationResponse":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/tts:Conversation"},"room":{"type":"string"},"token":{"type":"string","description":"Short-lived realtime session access token (JWT)."},"url":{"type":"string","description":"Realtime session wss:// URL to connect to."}},"required":["conversation","room","token","url"],"description":"Returned when a conversation is created. The `token` + `url`\nlet the caller connect its browser/SDK directly to the\nrealtime voice session — the agent that answers is dispatched\nserver-side.\n","title":"CreateConversationResponse"},"tts:CreateSessionRequest":{"type":"object","properties":{"user_identity":{"type":"string","description":"Opaque identifier for the end-user (e.g. your app's user ID). Stamped onto the conversation. Optional - defaults to an anonymous per-session ID."},"dynamic_variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-session variable overrides that merge on top of the agent's\nstored variable defaults for this one session. Keys in the\nreserved `system__` namespace are rejected at this boundary.\nValues must match the declared type of the corresponding variable\ndefinition on the agent (a `string` type expects a JSON string,\n`number` expects a JSON number, etc.).\n"}},"description":"Optional body for `POST /v1/agents/{id}/sessions`. Widget embeds usually pass nothing.","title":"CreateSessionRequest"},"tts:KnowledgeBase":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Human-readable label, shown in the console."},"description":{"type":"string","description":"Optional description."},"document_count":{"type":"integer","description":"Number of ingested documents."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","document_count","created_at","updated_at"],"description":"A bundle of documents that can be attached to one or more voice\nagents. Chunks across every document in the knowledge base are\nembedded and searched together.","title":"KnowledgeBase"},"tts:ListKnowledgeBasesResponse":{"type":"object","properties":{"knowledge_bases":{"type":"array","items":{"$ref":"#/components/schemas/tts:KnowledgeBase"}}},"required":["knowledge_bases"],"title":"ListKnowledgeBasesResponse"},"tts:Memory":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"caller_identity":{"type":"string","description":"Stable caller key (LiveKit participant identity) the memory is scoped to."},"fact":{"type":"string","description":"Short third-person statement about the caller."},"source_conversation_id":{"type":"string","description":"Conversation the memory was extracted from (may be empty if the source was deleted)."},"confidence":{"type":"number","format":"double","description":"LLM self-reported 0-1 confidence in the fact's durability and relevance."},"score":{"type":"number","format":"double","description":"Populated only on retrieval hits — recency-weighted cosine similarity."},"created_at":{"type":"string","format":"date-time"}},"required":["id","agent_id","caller_identity","fact","confidence","created_at"],"description":"One salient fact extracted post-call about a specific caller on\na specific agent. Retrieved at the next conversation-start for\nthe same caller and injected into the agent's system prompt via\nthe `{{memory}}` template variable.","title":"Memory"},"tts:ListMemoriesResponse":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/tts:Memory"}}},"required":["memories"],"title":"ListMemoriesResponse"},"tts:DeleteMemoriesByCallerRequest":{"type":"object","properties":{"agent_id":{"type":"string"},"caller_identity":{"type":"string"}},"required":["agent_id","caller_identity"],"title":"DeleteMemoriesByCallerRequest"},"tts:DeleteMemoriesByCallerResponse":{"type":"object","properties":{"deleted":{"type":"integer","description":"Number of memories soft-deleted."}},"required":["deleted"],"title":"DeleteMemoriesByCallerResponse"},"tts:TestType":{"type":"string","enum":["scenario","tool","simulation"],"description":"Discriminates the shape of `AgentTest.config`.\n- `scenario` - send one message to the agent and judge the response with an LLM.\n- `tool` - assert that the agent calls a specific tool given a context.\n- `simulation` - run a multi-turn conversation between the agent and an AI caller.\n","title":"TestType"},"tts:SimulationMessageRole":{"type":"string","enum":["user","assistant"],"title":"SimulationMessageRole"},"tts:SimulationMessage":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/tts:SimulationMessageRole"},"content":{"type":"string"}},"required":["role","content"],"description":"One turn in a simulation conversation. `role` is `user` (the AI caller) or `assistant` (the agent).","title":"SimulationMessage"},"tts:ScenarioConfig":{"type":"object","properties":{"context":{"type":"string","description":"User message sent to the agent to trigger the behaviour under test. Optional when `initial_chat_history` already ends with a user message."},"success_criteria":{"type":"string","description":"Natural-language description of what a passing agent response looks like."},"success_examples":{"type":"array","items":{"type":"string"},"description":"Concrete examples of passing responses (few-shot for the judge)."},"failure_examples":{"type":"array","items":{"type":"string"},"description":"Concrete examples of failing responses (few-shot for the judge)."},"initial_chat_history":{"type":"array","items":{"$ref":"#/components/schemas/tts:SimulationMessage"},"description":"Optional seed conversation prepended before `context`. Lets you test the agent's reply mid-conversation rather than on a cold single-turn prompt."},"system_prompt_override":{"type":"string","description":"Replaces the agent's system prompt for this run only. Useful for regression-isolating prompt changes."},"first_message_override":{"type":"string","description":"Replaces the agent's first message for this run only."},"model_override":{"type":"string","description":"Overrides the LLM model used by the agent for this run only."}},"required":["success_criteria"],"description":"Configuration for a `scenario` test. The runner sends `context` as\na user message and asks an LLM judge to evaluate the agent response\nagainst `success_criteria`. Optional few-shot examples sharpen the\njudge's calibration. Use `initial_chat_history` to prepend prior\nturns before `context`; when the history already ends with a user\nmessage, `context` may be omitted and the agent is evaluated on\nits reply to that last history turn.","title":"ScenarioConfig"},"tts:ParameterCheckMode":{"type":"string","enum":["exact","regex","llm"],"description":"How a `ParameterCheck` validates a tool argument.\n- `exact` - JSON equality.\n- `regex` - the argument stringified is matched against the pattern.\n- `llm` - an LLM judge decides whether the value semantically satisfies\n the criteria (e.g. \"is a plausible email address\").\n","title":"ParameterCheckMode"},"tts:ParameterCheck":{"type":"object","properties":{"path":{"type":"string","description":"Dotted JSON path to the argument being checked. Empty means the whole args object."},"mode":{"$ref":"#/components/schemas/tts:ParameterCheckMode"},"expected":{"type":"string","description":"Expected value string for `exact` and `regex` modes."},"criteria":{"type":"string","description":"Natural-language criteria for `llm` mode (e.g. \"is a valid email address\")."}},"required":["path","mode"],"description":"Validates one argument of an expected tool call. `path` is a\ndotted JSON path (e.g. `customer.email`); use zero-indexed\nnotation for arrays (`items.0.sku`). An empty path checks the\nwhole args object.","title":"ParameterCheck"},"tts:ToolCallConfig":{"type":"object","properties":{"context":{"type":"string","description":"User message that should cause the agent to invoke the expected tool. Optional when `initial_chat_history` already ends with a user message."},"expected_tool":{"type":"string","description":"Name of the tool the agent is expected to call."},"parameter_checks":{"type":"array","items":{"$ref":"#/components/schemas/tts:ParameterCheck"},"description":"Assertions on specific arguments of the tool call."},"initial_chat_history":{"type":"array","items":{"$ref":"#/components/schemas/tts:SimulationMessage"},"description":"Optional seed conversation prepended before `context`."},"system_prompt_override":{"type":"string","description":"Replaces the agent's system prompt for this run only."},"model_override":{"type":"string","description":"Overrides the LLM model used by the agent for this run only."}},"required":["expected_tool"],"description":"Configuration for a `tool` test. The runner sends `context` as a\nuser message and asserts that the agent calls `expected_tool` with\narguments matching all `parameter_checks`. Use\n`initial_chat_history` to test tool invocations that only make\nsense mid-conversation.","title":"ToolCallConfig"},"tts:SimulationConfig":{"type":"object","properties":{"scenario":{"type":"string","description":"Instructions for the AI caller describing who they are and what they want."},"success_condition":{"type":"string","description":"Natural-language description of what a passing conversation looks like."},"max_turns":{"type":"integer","default":5,"description":"Maximum agent turns before the simulation is cut off and judged."},"initial_chat_history":{"type":"array","items":{"$ref":"#/components/schemas/tts:SimulationMessage"},"description":"Optional seed conversation that precedes the AI caller's first generated message."},"system_prompt_override":{"type":"string","description":"Replaces the agent's system prompt for this run only."},"model_override":{"type":"string","description":"Overrides the LLM model used by the agent for this run only."}},"required":["scenario","success_condition","max_turns"],"description":"Configuration for a `simulation` test. An AI caller drives a\nmulti-turn conversation with the agent according to `scenario`.\nAfter `max_turns` exchanges (or when the agent ends the call), an\nLLM judge evaluates whether `success_condition` was met.\nUse `initial_chat_history` to seed the conversation at a specific\nmid-flow state.","title":"SimulationConfig"},"tts:AgentTestConfig":{"oneOf":[{"$ref":"#/components/schemas/tts:ScenarioConfig"},{"$ref":"#/components/schemas/tts:ToolCallConfig"},{"$ref":"#/components/schemas/tts:SimulationConfig"}],"description":"Type-specific configuration document.","title":"AgentTestConfig"},"tts:MockingStrategy":{"type":"string","enum":["none","all","selected"],"description":"Controls which tool calls the runner intercepts during a run.\nSystem tools (`end_call`, `transfer_to_number`, etc.) are never\nmocked regardless of strategy.\n- `none` - no interception; all tools are called normally.\n- `all` - every non-system tool call is intercepted and matched\n against the `mocks` list.\n- `selected` - only tools explicitly listed in `mocks` are\n intercepted; others are called normally.\n","title":"MockingStrategy"},"tts:ToolMock":{"type":"object","properties":{"tool_name":{"type":"string","description":"Name of the tool to intercept."},"args_match":{"type":"string","description":"Optional substring of the JSON-serialised call arguments. When\nabsent the mock matches unconditionally for this tool."},"response":{"description":"JSON value returned to the agent as the tool result."}},"required":["tool_name","response"],"description":"A canned response returned when the agent calls `tool_name`. If\n`args_match` is set the mock only triggers when its value appears\nas a substring of the JSON-serialised call arguments (a deliberately\nsimple v1 matcher — full expression support is planned). A mock\nwithout `args_match` always matches for its tool.","title":"ToolMock"},"tts:NoMatchBehavior":{"type":"string","enum":["call_real_tool","finish_with_error","skip"],"description":"Fallback when a mockable tool is called but no configured mock\nmatches the call arguments.\n- `call_real_tool` - pass-through: actually invoke the underlying tool.\n- `finish_with_error` - fail: short-circuit the run to an `error`\n status. Useful when a test wants to assert that a specific mocked\n response path is taken - any unmocked tool call aborts the run.\n- `skip` - return an empty stub (`{\"skipped\":true}`) to the agent so\n the simulation proceeds without treating the call as a failure.\n Useful when a tool's output is irrelevant to the behaviour under\n test but the model may still decide to call it.\n","title":"NoMatchBehavior"},"tts:ToolMockConfig":{"type":"object","properties":{"strategy":{"$ref":"#/components/schemas/tts:MockingStrategy"},"mocks":{"type":"array","items":{"$ref":"#/components/schemas/tts:ToolMock"},"description":"Canned responses for specific tools (order matters - first match wins)."},"no_match_behavior":{"$ref":"#/components/schemas/tts:NoMatchBehavior"}},"required":["strategy","no_match_behavior"],"description":"Controls tool-call interception during a test run.","title":"ToolMockConfig"},"tts:TestRunStatus":{"type":"string","enum":["queued","running","passed","failed","error"],"description":"Lifecycle of a test run: `queued` - `running` - terminal.\n\nTerminal states:\n- `passed` - the agent behaviour met the success criteria.\n- `failed` - the agent behaviour did not meet the success criteria.\n- `error` - the runner itself could not complete (LLM outage, network error, etc.),\n distinct from `failed` which means the agent behaviour was judged and found lacking.\n","title":"TestRunStatus"},"tts:ScenarioResult":{"type":"object","properties":{"agent_response":{"type":"string","description":"The raw text response the agent produced."},"passed":{"type":"boolean"},"rationale":{"type":"string","description":"LLM judge's explanation of the verdict."},"score":{"type":"number","format":"double","description":"0-1 judge confidence score."},"duration_ms":{"type":"integer","format":"int64","description":"Wall-clock time for the run in milliseconds."}},"required":["agent_response","passed","rationale","score","duration_ms"],"description":"Result details for a `scenario` test run.","title":"ScenarioResult"},"tts:ParameterCheckResult":{"type":"object","properties":{"path":{"type":"string"},"mode":{"$ref":"#/components/schemas/tts:ParameterCheckMode"},"actual_json":{"type":"string","description":"JSON-serialised actual value at `path`."},"passed":{"type":"boolean"},"rationale":{"type":"string","description":"LLM rationale (populated for `llm` mode checks)."}},"required":["path","mode","actual_json","passed"],"description":"Result of one `ParameterCheck` within a tool-call test run.","title":"ParameterCheckResult"},"tts:ToolCallResult":{"type":"object","properties":{"tool_called":{"type":"string","description":"Name of the tool the agent actually called (may differ from `expected_tool`)."},"tool_args":{"description":"Arguments the agent passed to the tool, as a JSON object."},"expected_tool":{"type":"string","description":"Name of the tool the test expected the agent to call."},"tool_matched":{"type":"boolean","description":"True when `tool_called` equals `expected_tool`."},"parameter_results":{"type":"array","items":{"$ref":"#/components/schemas/tts:ParameterCheckResult"}},"passed":{"type":"boolean"},"rationale":{"type":"string","description":"Explanation of the overall verdict."},"duration_ms":{"type":"integer","format":"int64"}},"required":["tool_called","expected_tool","tool_matched","parameter_results","passed","rationale","duration_ms"],"description":"Result details for a `tool` test run.","title":"ToolCallResult"},"tts:SimulationToolCall":{"type":"object","properties":{"turn_index":{"type":"integer","description":"Zero-based index of the conversation turn in which this call occurred."},"tool_name":{"type":"string"},"args":{"description":"Arguments passed to the tool, as a JSON object."},"response":{"description":"Response returned to the agent (absent for system tools that end the call)."},"mocked":{"type":"boolean"}},"required":["turn_index","tool_name","args","mocked"],"description":"One tool invocation that occurred during a simulation run.\n`mocked` is true when the call was intercepted by the run's\nmock config; false when the real tool was called or when the\ntool is a system tool.","title":"SimulationToolCall"},"tts:SimulationResult":{"type":"object","properties":{"transcript":{"type":"array","items":{"$ref":"#/components/schemas/tts:SimulationMessage"},"description":"Full synthetic conversation in order."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/tts:SimulationToolCall"},"description":"Every tool invocation across all turns."},"turns_used":{"type":"integer","description":"Number of agent turns that ran before the simulation ended."},"passed":{"type":"boolean"},"rationale":{"type":"string","description":"LLM judge's explanation of the verdict."},"duration_ms":{"type":"integer","format":"int64"}},"required":["transcript","turns_used","passed","rationale","duration_ms"],"description":"Result details for a `simulation` test run.","title":"SimulationResult"},"tts:TestRunResult":{"type":"object","properties":{"test_type":{"$ref":"#/components/schemas/tts:TestType"},"passed":{"type":"boolean"},"rationale":{"type":"string","description":"Top-level verdict explanation duplicated from the inner result for quick rendering."},"duration_ms":{"type":"integer","format":"int64"},"scenario":{"oneOf":[{"$ref":"#/components/schemas/tts:ScenarioResult"},{"type":"null"}]},"tool_call":{"oneOf":[{"$ref":"#/components/schemas/tts:ToolCallResult"},{"type":"null"}]},"simulation":{"oneOf":[{"$ref":"#/components/schemas/tts:SimulationResult"},{"type":"null"}]}},"required":["test_type","passed","rationale","duration_ms"],"description":"Union-like result of a completed test run. Exactly one of\n`scenario`, `tool_call`, or `simulation` is populated, matching\nthe `test_type`.","title":"TestRunResult"},"tts:AgentTestRun":{"type":"object","properties":{"id":{"type":"string"},"test_id":{"type":"string"},"agent_id":{"type":"string"},"status":{"$ref":"#/components/schemas/tts:TestRunStatus"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"result":{"oneOf":[{"$ref":"#/components/schemas/tts:TestRunResult"},{"type":"null"}],"description":"Populated on terminal status only."},"error":{"type":"string","description":"Human-readable error message when status is `error`."},"created_at":{"type":"string","format":"date-time"}},"required":["id","test_id","agent_id","status","created_at"],"description":"One execution of a test. `result` is populated when `status`\nreaches a terminal state (`passed`, `failed`, or `error`).\nSee `TestRunResult` for the shape.","title":"AgentTestRun"},"tts:AgentTestWithLastRun":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/tts:TestType"},"config":{"$ref":"#/components/schemas/tts:AgentTestConfig","description":"Type-specific configuration document."},"tool_mock_config":{"$ref":"#/components/schemas/tts:ToolMockConfig","description":"Optional tool-mocking config applied during runs of this test."},"variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-test dynamic-variable overrides. Keys substitute `{{key}}`\nplaceholders inside the test config at run-start. Unknown keys\nrender as empty string, matching session dispatch behaviour.\n"},"folder_id":{"type":["string","null"],"description":"Folder the test belongs to; null = root (unfiled)."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_run":{"oneOf":[{"$ref":"#/components/schemas/tts:AgentTestRun"},{"type":"null"}],"description":"The most recent run, or null if the test has never been run."},"attached_agent_ids":{"type":"array","items":{"type":"string"},"description":"Every agent this test runs against. Always includes the owner agent."}},"required":["id","agent_id","name","description","type","config","created_at","updated_at"],"description":"List-view projection of a test that includes the most recent run\nso the console can display pass/fail badges without an extra\nround-trip. On the global `/v1/tests` surface, also carries\n`attached_agent_ids` so the row can render agent chips without a\nfollow-up request.","title":"AgentTestWithLastRun"},"tts:ListAgentTestsResponse":{"type":"object","properties":{"tests":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestWithLastRun"}}},"required":["tests"],"title":"ListAgentTestsResponse"},"tts:CreateAgentTestRequestConfig":{"oneOf":[{"$ref":"#/components/schemas/tts:ScenarioConfig"},{"$ref":"#/components/schemas/tts:ToolCallConfig"},{"$ref":"#/components/schemas/tts:SimulationConfig"}],"description":"Type-specific configuration. Must match the shape for the given `type`.","title":"CreateAgentTestRequestConfig"},"tts:CreateAgentTestRequest":{"type":"object","properties":{"name":{"type":"string","description":"Short human-readable label for the test."},"description":{"type":"string","description":"Optional longer description of what this test verifies."},"type":{"$ref":"#/components/schemas/tts:TestType"},"config":{"$ref":"#/components/schemas/tts:CreateAgentTestRequestConfig","description":"Type-specific configuration. Must match the shape for the given `type`."},"tool_mock_config":{"$ref":"#/components/schemas/tts:ToolMockConfig","description":"Optional tool-mocking config applied during every run of this test."},"variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-test variable values substituted into string fields of the\nconfig at run-start. Keys use the same rules as agent-level\n`DynamicVariable` keys.\n"},"folder_id":{"type":["string","null"],"description":"Folder to place the test in. Omit for root."},"attached_agent_ids":{"type":"array","items":{"type":"string"},"description":"Optional list of additional agents this test should also run\nagainst. The owner agent (path param) is always attached\nimplicitly.\n"}},"required":["name","type","config"],"description":"Payload for `POST /v1/agents/{id}/tests`.","title":"CreateAgentTestRequest"},"tts:AgentTest":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/tts:TestType"},"config":{"$ref":"#/components/schemas/tts:AgentTestConfig","description":"Type-specific configuration document."},"tool_mock_config":{"$ref":"#/components/schemas/tts:ToolMockConfig","description":"Optional tool-mocking config applied during runs of this test."},"variables":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-test dynamic-variable overrides. Keys substitute `{{key}}`\nplaceholders inside the test config at run-start. Unknown keys\nrender as empty string, matching session dispatch behaviour.\n"},"folder_id":{"type":["string","null"],"description":"Folder the test belongs to; null = root (unfiled)."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","agent_id","name","description","type","config","created_at","updated_at"],"description":"A configured test against a voice agent. `config` is a\ntype-specific document - see `ScenarioConfig`, `ToolCallConfig`,\nand `SimulationConfig` for the per-type shapes (discriminated by `type`).","title":"AgentTest"},"tts:RunAgentTestsResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestRun"}}},"required":["runs"],"description":"Response from `POST /v1/agents/{id}/tests/runs`. Contains every\nnewly-queued run so the client can poll each for completion.\nCapped at 50 runs per call.","title":"RunAgentTestsResponse"},"tts:UpdateAgentTestRequestConfig":{"oneOf":[{"$ref":"#/components/schemas/tts:ScenarioConfig"},{"$ref":"#/components/schemas/tts:ToolCallConfig"},{"$ref":"#/components/schemas/tts:SimulationConfig"}],"description":"Replaces the test config when present.","title":"UpdateAgentTestRequestConfig"},"tts:UpdateAgentTestRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"config":{"$ref":"#/components/schemas/tts:UpdateAgentTestRequestConfig","description":"Replaces the test config when present."},"tool_mock_config":{"$ref":"#/components/schemas/tts:ToolMockConfig","description":"Replaces the tool-mock config when present."}},"description":"Payload for `PATCH /v1/tests/{id}`. All fields are optional;\nomitting a field leaves it unchanged.","title":"UpdateAgentTestRequest"},"tts:ListAgentTestRunsResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestRun"}}},"required":["runs"],"title":"ListAgentTestRunsResponse"},"tts:ListTestsResponse":{"type":"object","properties":{"tests":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestWithLastRun"}},"next_cursor":{"type":"string"}},"required":["tests"],"description":"Workspace-wide paginated list of tests. `next_cursor` is the opaque\npage cursor; omit on the first call, then pass through to get the\nnext page until the field is absent.","title":"ListTestsResponse"},"tts:TestStatsBucket":{"type":"object","properties":{"day":{"type":"string","description":"ISO date (YYYY-MM-DD)."},"passed":{"type":"integer"},"failed":{"type":"integer"},"errored":{"type":"integer"}},"required":["day","passed","failed","errored"],"description":"One daily point on the aggregate pass-rate chart.","title":"TestStatsBucket"},"tts:TestStats":{"type":"object","properties":{"window_days":{"type":"integer"},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/tts:TestStatsBucket"}},"total_runs":{"type":"integer"},"passed_runs":{"type":"integer"},"failed_runs":{"type":"integer"},"errored_runs":{"type":"integer"},"avg_duration_ms":{"type":"integer"},"by_type":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["window_days","buckets","total_runs","passed_runs","failed_runs","errored_runs","avg_duration_ms"],"description":"Aggregate run metrics over the requested window. `buckets` is\ndense - one entry per day in the window, zero-filled, so a chart\nnever has gaps. `by_type` counts runs per test type across the\nwhole window.","title":"TestStats"},"tts:BatchRunEntry":{"type":"object","properties":{"test_id":{"type":"string"},"agent_id":{"type":"string"}},"required":["test_id"],"description":"One entry in a batch-run request. Omit `agent_id` to fan out to\nevery agent the test is attached to.","title":"BatchRunEntry"},"tts:RunBatchRequest":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/tts:BatchRunEntry"}}},"required":["entries"],"description":"Batch-run payload. Total expanded runs across all entries are\ncapped at 100 per call.","title":"RunBatchRequest"},"tts:RunBatchResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestRun"}}},"required":["runs"],"title":"RunBatchResponse"},"tts:AgentTestAttachment":{"type":"object","properties":{"test_id":{"type":"string"},"agent_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["test_id","agent_id","created_at"],"description":"One (test, agent) pair. Poll the `attached_agent_ids` field on `AgentTestWithLastRun` or hit `/v1/tests/{id}/attachments` for the authoritative set.","title":"AgentTestAttachment"},"tts:ListAgentTestAttachmentsResponse":{"type":"object","properties":{"attachments":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestAttachment"}}},"required":["attachments"],"title":"ListAgentTestAttachmentsResponse"},"tts:MoveAgentTestRequest":{"type":"object","properties":{"folder_id":{"type":["string","null"]}},"description":"Body for `POST /v1/tests/{id}/move`. `folder_id: null` moves the test to root.","title":"MoveAgentTestRequest"},"tts:AgentTestFolder":{"type":"object","properties":{"id":{"type":"string"},"parent_folder_id":{"type":["string","null"]},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","created_at","updated_at"],"description":"One organisational node in the per-owner tests tree.","title":"AgentTestFolder"},"tts:ListAgentTestFoldersResponse":{"type":"object","properties":{"folders":{"type":"array","items":{"$ref":"#/components/schemas/tts:AgentTestFolder"}}},"required":["folders"],"title":"ListAgentTestFoldersResponse"},"tts:CreateAgentTestFolderRequest":{"type":"object","properties":{"name":{"type":"string"},"parent_folder_id":{"type":["string","null"]}},"required":["name"],"title":"CreateAgentTestFolderRequest"},"tts:UpdateAgentTestFolderRequest":{"type":"object","properties":{"name":{"type":"string"},"parent_folder_id":{"type":["string","null"]}},"description":"PATCH body. Both fields optional; omit to leave unchanged.\nPass `parent_folder_id: null` to reparent to root.","title":"UpdateAgentTestFolderRequest"},"tts:CreateToolRequestConfig":{"oneOf":[{"$ref":"#/components/schemas/tts:SystemToolConfig"},{"$ref":"#/components/schemas/tts:WebhookToolConfig"},{"$ref":"#/components/schemas/tts:ClientToolConfig"}],"title":"CreateToolRequestConfig"},"tts:CreateToolRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"kind":{"$ref":"#/components/schemas/tts:ToolKind"},"config":{"$ref":"#/components/schemas/tts:CreateToolRequestConfig"}},"required":["name","description","kind","config"],"title":"CreateToolRequest"},"tts:UpdateToolRequestConfig":{"oneOf":[{"$ref":"#/components/schemas/tts:SystemToolConfig"},{"$ref":"#/components/schemas/tts:WebhookToolConfig"},{"$ref":"#/components/schemas/tts:ClientToolConfig"}],"title":"UpdateToolRequestConfig"},"tts:UpdateToolRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"config":{"$ref":"#/components/schemas/tts:UpdateToolRequestConfig"}},"description":"All fields optional. `kind` is immutable — create a new tool to change it.","title":"UpdateToolRequest"},"tts:ListConversationsResponse":{"type":"object","properties":{"conversations":{"type":"array","items":{"$ref":"#/components/schemas/tts:Conversation"}}},"required":["conversations"],"title":"ListConversationsResponse"},"tts:MessageRole":{"type":"string","enum":["user","assistant","system","tool"],"title":"MessageRole"},"tts:Message":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"role":{"$ref":"#/components/schemas/tts:MessageRole"},"content":{"type":"string"},"tool_name":{"type":["string","null"]},"tool_args":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"tool_result":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Arbitrary JSON value returned by the tool (object, array, string, or primitive)."},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"}},"required":["id","conversation_id","role","content","started_at"],"title":"Message"},"tts:ListMessagesResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/tts:Message"}}},"required":["messages"],"title":"ListMessagesResponse"},"tts:EvaluationKind":{"type":"string","enum":["criterion","summary","data"],"title":"EvaluationKind"},"tts:EvaluationStatus":{"type":"string","enum":["success","failure","unknown"],"description":"Three-state criterion result. `unknown` means the criterion did not apply to this call.","title":"EvaluationStatus"},"tts:Evaluation":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"kind":{"$ref":"#/components/schemas/tts:EvaluationKind"},"criterion_id":{"type":["string","null"]},"name":{"type":"string"},"status":{"oneOf":[{"$ref":"#/components/schemas/tts:EvaluationStatus"},{"type":"null"}],"description":"Three-state criterion result. `unknown` means the criterion did not apply to this call."},"passed":{"type":["boolean","null"]},"score":{"type":["number","null"],"format":"double"},"rationale":{"type":"string"},"data":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Structured data-collection payload (present only on `kind=data` rows)."},"created_at":{"type":"string","format":"date-time"}},"required":["id","conversation_id","kind","name","rationale","created_at"],"description":"Three flavours coexist, discriminated by `kind`:\n- `criterion` rows carry `status` + `passed` + `score` + `rationale` for one criterion\n- `summary` row carries overall sentiment + rationale in `rationale`\n- `data` row carries the structured data-collection payload in `data`\n\n`status` is the canonical three-state result. `passed` is a\nderived boolean kept for backwards compatibility with earlier\nwebhook consumers: success→true, failure→false, unknown→null.\n","title":"Evaluation"},"tts:ListEvaluationsResponse":{"type":"object","properties":{"evaluations":{"type":"array","items":{"$ref":"#/components/schemas/tts:Evaluation"}}},"required":["evaluations"],"title":"ListEvaluationsResponse"},"tts:CreateKnowledgeBaseRequest":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable label."},"description":{"type":"string","description":"Optional description."}},"required":["name"],"title":"CreateKnowledgeBaseRequest"},"tts:UpdateKnowledgeBaseRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"title":"UpdateKnowledgeBaseRequest"},"tts:KnowledgeBaseDocumentStatus":{"type":"string","enum":["embedding","ready","failed"],"title":"KnowledgeBaseDocumentStatus"},"tts:KnowledgeBaseDocument":{"type":"object","properties":{"id":{"type":"string"},"kb_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"byte_size":{"type":"integer","format":"int64"},"char_count":{"type":"integer"},"chunk_count":{"type":"integer"},"status":{"$ref":"#/components/schemas/tts:KnowledgeBaseDocumentStatus"},"error":{"type":"string","description":"Populated when status is failed."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","kb_id","filename","content_type","byte_size","char_count","chunk_count","status","created_at","updated_at"],"title":"KnowledgeBaseDocument"},"tts:ListKnowledgeBaseDocumentsResponse":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/tts:KnowledgeBaseDocument"}}},"required":["documents"],"title":"ListKnowledgeBaseDocumentsResponse"},"tts:KnowledgeBaseChunk":{"type":"object","properties":{"id":{"type":"string"},"document_id":{"type":"string"},"kb_id":{"type":"string"},"chunk_index":{"type":"integer"},"content":{"type":"string"}},"required":["id","document_id","kb_id","chunk_index","content"],"title":"KnowledgeBaseChunk"},"tts:ListKnowledgeBaseChunksResponse":{"type":"object","properties":{"chunks":{"type":"array","items":{"$ref":"#/components/schemas/tts:KnowledgeBaseChunk"}}},"required":["chunks"],"title":"ListKnowledgeBaseChunksResponse"},"tts:SearchKnowledgeBasesRequest":{"type":"object","properties":{"query":{"type":"string","description":"Natural-language search query."},"kb_ids":{"type":"array","items":{"type":"string"},"description":"Knowledge bases to search across. Results scoped to caller-owned entries; unknown IDs are silently ignored."},"top_k":{"type":"integer","default":5,"description":"Max hits to return (default 5, capped at 50)."}},"required":["query","kb_ids"],"title":"SearchKnowledgeBasesRequest"},"tts:KnowledgeBaseSearchHit":{"type":"object","properties":{"chunk_id":{"type":"string"},"document_id":{"type":"string"},"kb_id":{"type":"string"},"filename":{"type":"string"},"chunk_index":{"type":"integer"},"content":{"type":"string"},"score":{"type":"number","format":"double","description":"Cosine similarity (higher = more relevant)."}},"required":["chunk_id","document_id","kb_id","filename","chunk_index","content","score"],"title":"KnowledgeBaseSearchHit"},"tts:SearchKnowledgeBasesResponse":{"type":"object","properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/tts:KnowledgeBaseSearchHit"}}},"required":["hits"],"title":"SearchKnowledgeBasesResponse"},"tts:TenantPlan":{"type":"string","enum":["free","pro","business","enterprise"],"description":"Billing plan tier.","title":"TenantPlan"},"tts:TenantDataRegion":{"type":"string","enum":["us","eu","in"],"description":"Geographic region the workspace's data is pinned to.","title":"TenantDataRegion"},"tts:Tenant":{"type":"object","properties":{"id":{"type":"string","description":"Opaque workspace ID."},"name":{"type":"string","description":"Display name set by the workspace owner."},"plan":{"$ref":"#/components/schemas/tts:TenantPlan","description":"Billing plan tier."},"data_region":{"$ref":"#/components/schemas/tts:TenantDataRegion","description":"Geographic region the workspace's data is pinned to."},"hipaa_mode":{"type":"boolean","description":"When true, HIPAA-compliant retention and logging is enforced."},"zero_retention":{"type":"boolean","description":"When true, no transcript / audio payloads are retained server-side."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","plan","data_region","hipaa_mode","zero_retention","created_at","updated_at"],"description":"A workspace the caller belongs to.","title":"Tenant"},"tts:TenantsListResponse":{"type":"object","properties":{"tenants":{"type":"array","items":{"$ref":"#/components/schemas/tts:Tenant"}}},"required":["tenants"],"title":"TenantsListResponse"},"tts:CreateWorkspaceRequest":{"type":"object","properties":{"name":{"type":"string","description":"Display name for the new workspace. Trimmed; must be 120 characters or fewer."}},"description":"Body for POST /v1/tenants. The `name` field is optional; omitting it falls back to \"Workspace\".","title":"CreateWorkspaceRequest"},"tts:UpdateWorkspaceRequest":{"type":"object","properties":{"name":{"type":"string","description":"New display name. Required; must be 120 characters or fewer."}},"required":["name"],"description":"Body for PATCH /v1/tenants/current.","title":"UpdateWorkspaceRequest"},"tts:MemberRole":{"type":"string","enum":["owner","admin","member"],"description":"Member's role within the workspace.\n\n- `owner` - Full control, including deleting the workspace.\n- `admin` - Manage members and invites; cannot change roles.\n- `member` - Standard access, no administrative rights.\n","title":"MemberRole"},"tts:Member":{"type":"object","properties":{"user_uid":{"type":"string","description":"Firebase user ID."},"email":{"type":"string","description":"Member's email from Firebase. Empty when the account has been deleted."},"display_name":{"type":"string","description":"Member's display name from Firebase."},"role":{"$ref":"#/components/schemas/tts:MemberRole"},"created_at":{"type":"string","format":"date-time","description":"When the user joined the workspace."},"is_self":{"type":"boolean","description":"True when this row is the authenticated caller."}},"required":["user_uid","role","created_at","is_self"],"description":"A member of a workspace (joined from `tenant_users` + Firebase profile).","title":"Member"},"tts:MembersListResponse":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/tts:Member"}}},"required":["members"],"title":"MembersListResponse"},"tts:UpdateMemberRoleRequest":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/tts:MemberRole"}},"required":["role"],"title":"UpdateMemberRoleRequest"},"tts:Invite":{"type":"object","properties":{"id":{"type":"string","description":"Opaque invite ID."},"email":{"type":"string","description":"Invitee email."},"invited_by":{"type":"string","description":"Firebase UID of the member who created the invite."},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"accepted_at":{"type":"string","format":"date-time","description":"Populated once the invite has been accepted."},"revoked_at":{"type":"string","format":"date-time","description":"Populated once the invite has been revoked."},"token":{"type":"string","description":"Invite token. Returned ONLY on the create-invite response;\nsubsequent list calls redact it. Use the token to build the\n`/join/{token}` join URL.\n"}},"required":["id","email","invited_by","created_at","expires_at"],"description":"A pending or historical workspace invite.","title":"Invite"},"tts:InvitesListResponse":{"type":"object","properties":{"invites":{"type":"array","items":{"$ref":"#/components/schemas/tts:Invite"}}},"required":["invites"],"title":"InvitesListResponse"},"tts:CreateInviteRequest":{"type":"object","properties":{"email":{"type":"string","description":"Email of the person to invite. Validated as an RFC 5322 address."}},"required":["email"],"title":"CreateInviteRequest"},"tts:InvitePreview":{"type":"object","properties":{"tenant_id":{"type":"string","description":"Opaque workspace id. Safe to echo back on the accept call."},"tenant_name":{"type":"string","description":"Workspace display name."},"invited_email":{"type":"string","description":"The email address the inviter typed when creating the invite."},"invited_by_email":{"type":"string","description":"Firebase email of the member who created the invite. May be\nabsent if the Firebase profile lookup failed transiently —\nclients should still render the preview in that case.\n"},"invited_by_display_name":{"type":"string","description":"Firebase display name of the member who created the invite."},"expires_at":{"type":"string","format":"date-time"}},"required":["tenant_id","tenant_name","invited_email","expires_at"],"description":"Unauthenticated preview of a workspace invite. Surfaces only what\nthe recipient needs to decide whether to accept (workspace name,\ninvited address, inviter, expiry). Billing, plan, data region,\nand invite token are deliberately omitted.\n","title":"InvitePreview"},"tts:TransferOwnershipRequest":{"type":"object","properties":{"user_uid":{"type":"string","description":"Firebase UID of the member who will become the new owner."}},"required":["user_uid"],"description":"Body for POST /v1/tenants/current/transfer-owner. The target\nmust already be a member of the current workspace — promote via\ninvite + accept first for external users.\n","title":"TransferOwnershipRequest"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Enter the key with the `Bearer` prefix, e.g. 'Bearer API_KEY|ACCESS_TOKEN'."}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v1/audio/speech":{"post":{"operationId":"speech","summary":"Create Speech","description":"Synthesize speech audio from text or SSML. Returns the complete audio\nfile plus billing and speech-mark metadata in a single response. For\nlow-latency playback or long-form text, use POST /v1/audio/stream.","tags":["subpackage_tts.subpackage_tts/audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech audio for the requested input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:GetSpeechResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:GetSpeechRequest"}}}}}},"/v1/audio/stream":{"post":{"operationId":"stream","summary":"Stream Speech","description":"Synthesize speech and stream the audio back as it is generated, for\nlow-latency playback. The Accept header selects the audio container.\nFor short text where receiving the whole file at once is fine, use\nPOST /v1/audio/speech.","tags":["subpackage_tts.subpackage_tts/audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"schema":{"$ref":"#/components/schemas/tts:V1AudioStreamPostParametersAccept"}}],"responses":{"200":{"description":"Chunked audio stream for the requested input.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:GetStreamRequest"}}}}}},"/v1/voices":{"get":{"operationId":"list","summary":"List Voices","description":"Gets the list of voices available for the user","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voices","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tts:GetVoice"}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}}}},"post":{"operationId":"create","summary":"Create Voice","description":"Create a personal (cloned) voice for the user","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A created voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:CreatedVoice"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the personal voice"},"locale":{"type":"string","default":"en-US","description":"Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)"},"gender":{"$ref":"#/components/schemas/tts:V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender","description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnotSpecified GenderNotSpecified"},"sample":{"type":"string","format":"binary","description":"Audio sample file"},"avatar":{"type":"string","format":"binary","description":"Avatar image file"},"consent":{"type":"string","description":"A **string** representing the user consent information in JSON format\nThis should include the fullName and email of the consenting individual.\nFor example, `{\"fullName\": \"John Doe\", \"email\": \"john@example.com\"}`"}},"required":["name","gender","sample","consent"]}}}}}},"/v1/voices/{id}":{"delete":{"operationId":"delete","summary":"Delete Voice","description":"Delete a personal (cloned) voice","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to delete","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Voice deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}}}}},"/v1/voices/{id}/sample":{"get":{"operationId":"download-sample","summary":"Download Voice Sample","description":"Download a personal (cloned) voice sample","tags":["subpackage_tts.subpackage_tts/voices"],"parameters":[{"name":"id","in":"path","description":"The ID of the voice to download sample for","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice sample audio file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (Firebase ID token, API key, or\nworker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tts:Error"}}}}}}}},"servers":[{"url":"https://api.speechify.ai"}],"components":{"schemas":{"tts:GetSpeechRequestAudioFormat":{"type":"string","enum":["wav","mp3","ogg","aac","pcm"],"default":"wav","description":"The format for the output audio. Note, that the current default is \"wav\", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect.","title":"GetSpeechRequestAudioFormat"},"tts:GetSpeechRequestModel":{"type":"string","enum":["simba-english","simba-multilingual","simba-3.0"],"default":"simba-english","description":"Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.","title":"GetSpeechRequestModel"},"tts:GetSpeechOptionsRequest":{"type":"object","properties":{"loudness_normalization":{"type":"boolean","default":false,"description":"Determines whether to normalize the audio loudness to a standard level.\nWhen enabled, loudness normalization aligns the audio output to the following standards:\nIntegrated loudness: -14 LUFS\nTrue peak: -2 dBTP\nLoudness range: 7 LU\nIf disabled, the audio loudness will match the original loudness of the selected voice, which may vary significantly and be either too quiet or too loud.\nEnabling loudness normalization can increase latency due to additional processing required for audio level adjustments."},"text_normalization":{"type":"boolean","default":true,"description":"Determines whether to normalize the text. If enabled, it will transform numbers, dates, etc. into words. For example, \"55\" is normalized into \"fifty five\".\nThis can increase latency due to additional processing required for text normalization."}},"description":"GetSpeechOptionsRequest is the wrapper for request parameters to the client","title":"GetSpeechOptionsRequest"},"tts:GetSpeechRequest":{"type":"object","properties":{"audio_format":{"$ref":"#/components/schemas/tts:GetSpeechRequestAudioFormat","default":"wav","description":"The format for the output audio. Note, that the current default is \"wav\", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect."},"input":{"type":"string","description":"Plain text or SSML to be synthesized to speech.\nRefer to https://docs.speechify.ai/docs/api-limits for the input size limits.\nEmotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody"},"language":{"type":"string","description":"Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US.\nPlease refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support."},"model":{"$ref":"#/components/schemas/tts:GetSpeechRequestModel","default":"simba-english","description":"Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships."},"options":{"$ref":"#/components/schemas/tts:GetSpeechOptionsRequest"},"voice_id":{"type":"string","description":"Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices"}},"required":["input","voice_id"],"description":"Request body for POST /v1/audio/speech.","title":"GetSpeechRequest"},"tts:GetSpeechResponseAudioFormat":{"type":"string","enum":["wav","mp3","ogg","aac","pcm"],"description":"The format of the audio data","title":"GetSpeechResponseAudioFormat"},"tts:NestedChunk":{"type":"object","properties":{"end":{"type":"integer","format":"int64"},"end_time":{"type":"number","format":"double"},"start":{"type":"integer","format":"int64"},"start_time":{"type":"number","format":"double"},"type":{"type":"string"},"value":{"type":"string"}},"description":"It details the type of segment, its start and end points in the text, and its start and end times in the synthesized speech audio.","title":"NestedChunk"},"tts:SpeechMarks":{"type":"object","properties":{"chunks":{"type":"array","items":{"$ref":"#/components/schemas/tts:NestedChunk"},"description":"Array of NestedChunk, each providing detailed segment information within the synthesized speech."},"end":{"type":"integer","format":"int64"},"end_time":{"type":"number","format":"double"},"start":{"type":"integer","format":"int64"},"start_time":{"type":"number","format":"double"},"type":{"type":"string"},"value":{"type":"string"}},"required":["chunks","end","end_time","start","start_time","type"],"description":"It is used to annotate the audio data with metadata about the synthesis process, like word timing or phoneme details.","title":"SpeechMarks"},"tts:GetSpeechResponse":{"type":"object","properties":{"audio_data":{"type":"string","format":"byte","description":"Synthesized speech audio, Base64-encoded"},"audio_format":{"$ref":"#/components/schemas/tts:GetSpeechResponseAudioFormat","description":"The format of the audio data"},"billable_characters_count":{"type":"integer","format":"int64","description":"The number of billable characters processed in the request."},"speech_marks":{"$ref":"#/components/schemas/tts:SpeechMarks"}},"required":["audio_data","audio_format","billable_characters_count","speech_marks"],"title":"GetSpeechResponse"},"tts:ErrorCode":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","forbidden","not_found","method_not_allowed","conflict","payload_too_large","unsupported_media_type","rate_limited","internal_error","upstream_failure","service_unavailable","caller_not_found","credential_not_found","payment_method_required"],"description":"Stable machine-readable error code. Additive only: codes are\nnever renamed, only deprecated. SDKs may map each code to a\ntyped exception class. Status-code semantics:\n4xx codes describe caller-fixable issues; 5xx codes describe\nserver-side failures and are safe to retry with backoff for\nidempotent requests.\n","title":"ErrorCode"},"tts:ErrorDetail":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/tts:ErrorCode"},"message":{"type":"string","description":"Human-readable explanation of this specific occurrence.\nSafe to surface in UI banners or pass to support. The\nwording can change between releases; clients should\nmatch on `code`, not on the message string.\n"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-field validation errors as `path -> message`. Only\npresent on 400 responses caused by request validation\n(typically code=`validation_failed`). Keys are field\npaths in dotted/bracket notation; values are short\nhuman explanations safe to inline-surface next to the\noffending form field.\n"}},"required":["code","message"],"title":"ErrorDetail"},"tts:Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/tts:ErrorDetail"},"request_id":{"type":"string","description":"Server-side request identifier. Echoes the\n`X-Request-ID` response header. Stable across the\nrequest's lifetime, written to structured logs, and\nuseful when reporting issues.\n"}},"required":["error"],"description":"Standard error envelope returned on every non-2xx response.\nContent-Type is `application/json`. The shape mirrors OpenAI /\nAnthropic / Stripe style: a machine-readable `error.code` for\nSDK consumers to switch on, a human `error.message` for UI,\nand an optional `error.fields` map for per-field validation\nerrors. `request_id` matches the `X-Request-ID` response\nheader and is what customers quote when filing support\ntickets.\n","title":"Error"},"tts:V1AudioStreamPostParametersAccept":{"type":"string","enum":["audio/mpeg","audio/ogg","audio/aac","audio/pcm"],"title":"V1AudioStreamPostParametersAccept"},"tts:GetStreamRequestModel":{"type":"string","enum":["simba-english","simba-multilingual","simba-3.0"],"default":"simba-english","description":"Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.","title":"GetStreamRequestModel"},"tts:GetStreamOptionsRequest":{"type":"object","properties":{"loudness_normalization":{"type":"boolean","default":false,"description":"Determines whether to normalize the audio loudness to a standard level.\nWhen enabled, loudness normalization aligns the audio output to the following standards:\nIntegrated loudness: -14 LUFS\nTrue peak: -2 dBTP\nLoudness range: 7 LU\nIf disabled, the audio loudness will match the original loudness of the selected voice, which may vary significantly and be either too quiet or too loud.\nEnabling loudness normalization can increase latency due to additional processing required for audio level adjustments."},"text_normalization":{"type":"boolean","default":false,"description":"Determines whether to normalize the text. If enabled, it will transform numbers, dates, etc. into words. For example, \"55\" is normalized into \"fifty five\".\nThis can increase latency due to additional processing required for text normalization."}},"description":"GetStreamOptionsRequest is the wrapper for request parameters to the client","title":"GetStreamOptionsRequest"},"tts:GetStreamRequest":{"type":"object","properties":{"input":{"type":"string","description":"Plain text or SSML to be synthesized to speech.\nRefer to https://docs.speechify.ai/docs/api-limits for the input size limits.\nEmotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody"},"language":{"type":"string","description":"Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US.\nPlease refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support."},"model":{"$ref":"#/components/schemas/tts:GetStreamRequestModel","default":"simba-english","description":"Model used for audio synthesis. `simba-english` is optimized for English, `simba-multilingual` for non-English or mixed input. `simba-3.0` is the streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships."},"options":{"$ref":"#/components/schemas/tts:GetStreamOptionsRequest"},"voice_id":{"type":"string","description":"Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices"}},"required":["input","voice_id"],"description":"GetStreamRequest is the wrapper for request parameters to the client","title":"GetStreamRequest"},"tts:GetVoiceGender":{"type":"string","enum":["male","female","notSpecified"],"title":"GetVoiceGender"},"tts:GetVoiceLanguage":{"type":"object","properties":{"locale":{"type":"string"},"preview_audio":{"type":["string","null"]}},"required":["locale"],"title":"GetVoiceLanguage"},"tts:GetVoicesModelName":{"type":"string","enum":["simba-english","simba-multilingual","simba-3.0"],"title":"GetVoicesModelName"},"tts:GetVoicesModel":{"type":"object","properties":{"languages":{"type":"array","items":{"$ref":"#/components/schemas/tts:GetVoiceLanguage"}},"name":{"$ref":"#/components/schemas/tts:GetVoicesModelName"}},"required":["languages","name"],"title":"GetVoicesModel"},"tts:GetVoiceType":{"type":"string","enum":["shared","personal"],"title":"GetVoiceType"},"tts:GetVoice":{"type":"object","properties":{"avatar_image":{"type":["string","null"]},"display_name":{"type":"string"},"gender":{"$ref":"#/components/schemas/tts:GetVoiceGender"},"locale":{"type":"string"},"id":{"type":"string"},"models":{"type":"array","items":{"$ref":"#/components/schemas/tts:GetVoicesModel"}},"preview_audio":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"type":{"$ref":"#/components/schemas/tts:GetVoiceType"}},"required":["display_name","gender","locale","id","models","type"],"title":"GetVoice"},"tts:V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender":{"type":"string","enum":["male","female","notSpecified"],"description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnotSpecified GenderNotSpecified","title":"V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender"},"tts:CreatedVoiceGender":{"type":"string","enum":["male","female","notSpecified"],"title":"CreatedVoiceGender"},"tts:CreateVoiceLanguage":{"type":"object","properties":{"locale":{"type":"string"},"preview_audio":{"type":["string","null"]}},"title":"CreateVoiceLanguage"},"tts:CreateVoiceModelName":{"type":"string","enum":["simba-english","simba-multilingual","simba-3.0"],"title":"CreateVoiceModelName"},"tts:CreateVoiceModel":{"type":"object","properties":{"languages":{"type":"array","items":{"$ref":"#/components/schemas/tts:CreateVoiceLanguage"}},"name":{"$ref":"#/components/schemas/tts:CreateVoiceModelName"}},"title":"CreateVoiceModel"},"tts:CreatedVoiceType":{"type":"string","enum":["shared","personal"],"title":"CreatedVoiceType"},"tts:CreatedVoice":{"type":"object","properties":{"avatar_image":{"type":"string"},"display_name":{"type":"string"},"gender":{"$ref":"#/components/schemas/tts:CreatedVoiceGender"},"locale":{"type":"string"},"id":{"type":"string"},"models":{"type":"array","items":{"$ref":"#/components/schemas/tts:CreateVoiceModel"}},"type":{"$ref":"#/components/schemas/tts:CreatedVoiceType"}},"required":["display_name","gender","locale","id","models","type"],"title":"CreatedVoice"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'."}}}} \ No newline at end of file