From e9fd1473c12a7c9f56c9e1421ceab76730ccac16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 May 2026 21:51:15 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../PlayHT.Models.CreateSpeechRequest.g.cs | 1 + .../PlayHT.Models.CreateSpeechResponse.g.cs | 1 + .../PlayHT.Models.ErrorResponse.g.cs | 1 + .../PlayHT.Models.ListVoicesResponse.g.cs | 14 ++++++++++ ...yHT.Models.ListVoicesResponseVariant2.g.cs | 1 + .../Generated/PlayHT.Models.SpeechJob.g.cs | 1 + .../PlayHT.Models.SpeechJobOutput.g.cs | 1 + .../PlayHT.Models.StreamSpeechRequest.g.cs | 14 ++++++++++ ...HT.Models.StreamSpeechRequestVariant2.g.cs | 1 + .../PlayHT/Generated/PlayHT.Models.Voice.g.cs | 1 + .../PlayHT.Models.WebSocketAuthResponse.g.cs | 1 + ...ls.WebSocketAuthResponseWebSocketUrls.g.cs | 1 + .../Generated/PlayHT.OptionsSupport.g.cs | 27 ++++++++++++++++++- 13 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechRequest.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechRequest.g.cs index 38f46c0..9290a8a 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechRequest.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechRequest.g.cs @@ -108,5 +108,6 @@ public CreateSpeechRequest( public CreateSpeechRequest() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechResponse.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechResponse.g.cs index 34bca0e..b108c7a 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechResponse.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.CreateSpeechResponse.g.cs @@ -66,5 +66,6 @@ public CreateSpeechResponse( public CreateSpeechResponse() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.ErrorResponse.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.ErrorResponse.g.cs index a21d06e..cf07d8d 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.ErrorResponse.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.ErrorResponse.g.cs @@ -57,5 +57,6 @@ public ErrorResponse( public ErrorResponse() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponse.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponse.g.cs index 0d7c736..21c1fc8 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponse.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponse.g.cs @@ -39,6 +39,13 @@ public bool TryPickListVoicesResponseVariant1( return IsListVoicesResponseVariant1; } + /// + /// + /// + public global::System.Collections.Generic.IList PickListVoicesResponseVariant1() => IsListVoicesResponseVariant1 + ? ListVoicesResponseVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'ListVoicesResponseVariant1' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickListVoicesResponseVariant2( value = ListVoicesResponseVariant2; return IsListVoicesResponseVariant2; } + + /// + /// + /// + public global::PlayHT.ListVoicesResponseVariant2 PickListVoicesResponseVariant2() => IsListVoicesResponseVariant2 + ? ListVoicesResponseVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ListVoicesResponseVariant2' but the value was {ToString()}."); /// /// /// diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponseVariant2.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponseVariant2.g.cs index c04a38a..c2386a2 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponseVariant2.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponseVariant2.g.cs @@ -39,5 +39,6 @@ public ListVoicesResponseVariant2( public ListVoicesResponseVariant2() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJob.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJob.g.cs index 503165c..7c76b98 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJob.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJob.g.cs @@ -75,5 +75,6 @@ public SpeechJob( public SpeechJob() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJobOutput.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJobOutput.g.cs index acfeeba..2415be7 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJobOutput.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.SpeechJobOutput.g.cs @@ -14,5 +14,6 @@ public sealed partial class SpeechJobOutput /// [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/PlayHT/Generated/PlayHT.Models.StreamSpeechRequest.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequest.g.cs index e2f4ac1..640c609 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequest.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequest.g.cs @@ -39,6 +39,13 @@ public bool TryPickCreate( return IsCreate; } + /// + /// + /// + public global::PlayHT.CreateSpeechRequest PickCreate() => IsCreate + ? Create! + : throw new global::System.InvalidOperationException($"Expected union variant 'Create' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickStreamSpeechRequestVariant2( value = StreamSpeechRequestVariant2; return IsStreamSpeechRequestVariant2; } + + /// + /// + /// + public global::PlayHT.StreamSpeechRequestVariant2 PickStreamSpeechRequestVariant2() => IsStreamSpeechRequestVariant2 + ? StreamSpeechRequestVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'StreamSpeechRequestVariant2' but the value was {ToString()}."); /// /// /// diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequestVariant2.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequestVariant2.g.cs index 265e97d..64a06c7 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequestVariant2.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequestVariant2.g.cs @@ -39,5 +39,6 @@ public StreamSpeechRequestVariant2( public StreamSpeechRequestVariant2() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.Voice.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.Voice.g.cs index 9869778..ed02a2f 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.Voice.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.Voice.g.cs @@ -111,5 +111,6 @@ public Voice( public Voice() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponse.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponse.g.cs index 4dc3776..f38adb4 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponse.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponse.g.cs @@ -48,5 +48,6 @@ public WebSocketAuthResponse( public WebSocketAuthResponse() { } + } } \ No newline at end of file diff --git a/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponseWebSocketUrls.g.cs b/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponseWebSocketUrls.g.cs index 91db379..1a5fe50 100644 --- a/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponseWebSocketUrls.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.Models.WebSocketAuthResponseWebSocketUrls.g.cs @@ -14,5 +14,6 @@ public sealed partial class WebSocketAuthResponseWebSocketUrls /// [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/PlayHT/Generated/PlayHT.OptionsSupport.g.cs b/src/libs/PlayHT/Generated/PlayHT.OptionsSupport.g.cs index f829b56..1783d7b 100644 --- a/src/libs/PlayHT/Generated/PlayHT.OptionsSupport.g.cs +++ b/src/libs/PlayHT/Generated/PlayHT.OptionsSupport.g.cs @@ -163,8 +163,24 @@ public sealed class AutoSDKAuthorizationProviderHook : global::PlayHT.AutoSDKHoo { 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]); + } + + return; + } + var provider = context.ClientOptions?.AuthorizationProvider; - if (provider == null || context.Request == null) + if (provider == null) { return; } @@ -237,6 +253,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; } } ///