Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ public CreateSpeechRequest(
public CreateSpeechRequest()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ public CreateSpeechResponse(
public CreateSpeechResponse()
{
}

}
}
1 change: 1 addition & 0 deletions src/libs/PlayHT/Generated/PlayHT.Models.ErrorResponse.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ public ErrorResponse(
public ErrorResponse()
{
}

}
}
14 changes: 14 additions & 0 deletions src/libs/PlayHT/Generated/PlayHT.Models.ListVoicesResponse.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public bool TryPickListVoicesResponseVariant1(
return IsListVoicesResponseVariant1;
}

/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::PlayHT.Voice> PickListVoicesResponseVariant1() => IsListVoicesResponseVariant1
? ListVoicesResponseVariant1!
: throw new global::System.InvalidOperationException($"Expected union variant 'ListVoicesResponseVariant1' but the value was {ToString()}.");

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -68,6 +75,13 @@ public bool TryPickListVoicesResponseVariant2(
value = ListVoicesResponseVariant2;
return IsListVoicesResponseVariant2;
}

/// <summary>
///
/// </summary>
public global::PlayHT.ListVoicesResponseVariant2 PickListVoicesResponseVariant2() => IsListVoicesResponseVariant2
? ListVoicesResponseVariant2!
: throw new global::System.InvalidOperationException($"Expected union variant 'ListVoicesResponseVariant2' but the value was {ToString()}.");
/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ public ListVoicesResponseVariant2(
public ListVoicesResponseVariant2()
{
}

}
}
1 change: 1 addition & 0 deletions src/libs/PlayHT/Generated/PlayHT.Models.SpeechJob.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ public SpeechJob(
public SpeechJob()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class SpeechJobOutput
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
14 changes: 14 additions & 0 deletions src/libs/PlayHT/Generated/PlayHT.Models.StreamSpeechRequest.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public bool TryPickCreate(
return IsCreate;
}

/// <summary>
///
/// </summary>
public global::PlayHT.CreateSpeechRequest PickCreate() => IsCreate
? Create!
: throw new global::System.InvalidOperationException($"Expected union variant 'Create' but the value was {ToString()}.");

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -68,6 +75,13 @@ public bool TryPickStreamSpeechRequestVariant2(
value = StreamSpeechRequestVariant2;
return IsStreamSpeechRequestVariant2;
}

/// <summary>
///
/// </summary>
public global::PlayHT.StreamSpeechRequestVariant2 PickStreamSpeechRequestVariant2() => IsStreamSpeechRequestVariant2
? StreamSpeechRequestVariant2!
: throw new global::System.InvalidOperationException($"Expected union variant 'StreamSpeechRequestVariant2' but the value was {ToString()}.");
/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ public StreamSpeechRequestVariant2(
public StreamSpeechRequestVariant2()
{
}

}
}
1 change: 1 addition & 0 deletions src/libs/PlayHT/Generated/PlayHT.Models.Voice.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@ public Voice(
public Voice()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ public WebSocketAuthResponse(
public WebSocketAuthResponse()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class WebSocketAuthResponseWebSocketUrls
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
27 changes: 26 additions & 1 deletion src/libs/PlayHT/Generated/PlayHT.OptionsSupport.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -237,6 +253,15 @@ public sealed class AutoSDKRequestOptions
/// Overrides response buffering for this request when set.
/// </summary>
public bool? ReadResponseAsString { get; set; }

/// <summary>
/// Optional per-request authorization values. When non-empty, the built-in
/// <see cref="AutoSDKAuthorizationProviderHook"/> applies these instead of consulting
/// <see cref="AutoSDKClientOptions.AuthorizationProvider"/> 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.
/// </summary>
public global::System.Collections.Generic.IReadOnlyList<global::PlayHT.AutoSDKAuthorizationValue>? Authorizations { get; set; }
}

/// <summary>
Expand Down