diff --git a/src/libs/Speechify/Generated/Speechify.Admin.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Admin.JsonSerializerContext.g.cs new file mode 100644 index 0000000..1e7462d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Admin.JsonSerializerContext.g.cs @@ -0,0 +1,163 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShadowConversationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + internal sealed partial class AdminSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AdminSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AdminSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AdminSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AdminSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AdminClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AdminClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..c0d2505 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AdminClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AdminClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AdminClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AdminClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..c013863 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AdminClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AdminClient + { + /// + + public AdminClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.AdminClient.g.cs b/src/libs/Speechify/Generated/Speechify.AdminClient.g.cs index b62c807..71caeb1 100644 --- a/src/libs/Speechify/Generated/Speechify.AdminClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AdminClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class AdminClient : global::Speechify.IAdminClient, global /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.AdminSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs new file mode 100644 index 0000000..d2c9382 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs @@ -0,0 +1,1189 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentChannel), TypeInfoPropertyName = "AgentChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentAdditionalLanguage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentLlmConfigProvider), TypeInfoPropertyName = "AgentLlmConfigProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentLlmConfigReasoningEffort), TypeInfoPropertyName = "AgentLlmConfigReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentLLMConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTTSConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTurnHandlingConfigInterruptionSensitivity), TypeInfoPropertyName = "AgentTurnHandlingConfigInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTurnHandlingConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentMemoryConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentNavigatorConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentGuardrailsConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentBackgroundNoiseConfigPreset), TypeInfoPropertyName = "AgentBackgroundNoiseConfigPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentBackgroundNoiseConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigStyle), TypeInfoPropertyName = "WidgetConfigStyle2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTheme), TypeInfoPropertyName = "WidgetConfigTheme2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigAvatarType), TypeInfoPropertyName = "WidgetConfigAvatarType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigAvatar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigText))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTerms))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTranscript))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTelemetry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction), TypeInfoPropertyName = "AmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction), TypeInfoPropertyName = "AmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvr))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction), TypeInfoPropertyName = "AmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailable))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigTuning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AMDConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AIDisclosure))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Agent))] + [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.ListAgentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceType), TypeInfoPropertyName = "AgentVoiceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceModelName), TypeInfoPropertyName = "AgentVoiceModelName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceLanguage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceModel))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceGender), TypeInfoPropertyName = "AgentVoiceGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoice))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MultilingualLanguage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentVoicesResponse))] + [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.AgentTTSModelInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTTSModelsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentPhoneNumberReferenceResourceType), TypeInfoPropertyName = "AgentPhoneNumberReferenceResourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentPhoneNumberReference))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentPhoneNumberUsedBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentInUseErrorDetailDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentInUseErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentInUseError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishGateResultDecision), TypeInfoPropertyName = "PublishGateResultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictOutcome), TypeInfoPropertyName = "EvaluationCaseVerdictOutcome2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictFault), TypeInfoPropertyName = "EvaluationCaseVerdictFault2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterionVerdictStatus), TypeInfoPropertyName = "EvaluationCriterionVerdictStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterionVerdict))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdict))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationVerdict))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishGateResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterion))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataCollectionFieldType), TypeInfoPropertyName = "DataCollectionFieldType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataCollectionField))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationConfig))] + [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.UpdateEvaluationConfigRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DynamicVariableType), TypeInfoPropertyName = "DynamicVariableType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DynamicVariable))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemVariableDoc))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListDynamicVariablesResponse))] + [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.UpdateDynamicVariablesRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateConversationOverrides))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateConversationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStatus), TypeInfoPropertyName = "ConversationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport), TypeInfoPropertyName = "ConversationTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel), TypeInfoPropertyName = "ConversationChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason), TypeInfoPropertyName = "ConversationEndReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkillPin))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotReasoningEffort), TypeInfoPropertyName = "AgentSnapshotReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity), TypeInfoPropertyName = "AgentSnapshotInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset), TypeInfoPropertyName = "AgentSnapshotBackgroundNoisePreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshot))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationIvrSurrenderReason), TypeInfoPropertyName = "ConversationIvrSurrenderReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Conversation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateConversationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateSessionRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Memory))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListMemoriesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus), TypeInfoPropertyName = "JobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishAgentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishAgentResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseInjection))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachedKnowledgeBasesResponseInjection))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachedKnowledgeBasesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolKind), TypeInfoPropertyName = "ToolKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolParamType), TypeInfoPropertyName = "ToolParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BuiltinToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookToolConfigMethod), TypeInfoPropertyName = "WebhookToolConfigMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset), TypeInfoPropertyName = "LongRunningToolConfigWaitAudioPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigWaitAudio))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigOnDuplicate), TypeInfoPropertyName = "LongRunningToolConfigOnDuplicate2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ClientToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPTransport), TypeInfoPropertyName = "MCPTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuth), TypeInfoPropertyName = "MCPAuth2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant1Type), TypeInfoPropertyName = "MCPAuthVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant2Type), TypeInfoPropertyName = "MCPAuthVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type), TypeInfoPropertyName = "MCPAuthVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType), TypeInfoPropertyName = "MCPAuthDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass), TypeInfoPropertyName = "ToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentToolConfig), TypeInfoPropertyName = "AgentToolConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass), TypeInfoPropertyName = "ToolApprovalClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach), TypeInfoPropertyName = "ToolReach2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentToolsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentToolRequestConfig), TypeInfoPropertyName = "CreateAgentToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentToolRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolderKind), TypeInfoPropertyName = "ToolNameHolderKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolder))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameTakenErrorDetailDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameTakenErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameTakenError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentToolRequestConfig), TypeInfoPropertyName = "UpdateAgentToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentToolRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemBuiltinInfoExecution), TypeInfoPropertyName = "SystemBuiltinInfoExecution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemBuiltinInfo))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListSystemBuiltinsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestType), TypeInfoPropertyName = "TestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessageRole), TypeInfoPropertyName = "SimulationMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckMode), TypeInfoPropertyName = "ParameterCheckMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestVerdict), TypeInfoPropertyName = "TestVerdict2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ReplyResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolCallResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationToolCall))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResultSentiment), TypeInfoPropertyName = "SimulationResultSentiment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResultStatus), TypeInfoPropertyName = "SimulationCriterionResultStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResultMode), TypeInfoPropertyName = "DataAssertionResultMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResult))] + [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestRunResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestRunConfigOverride))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SuiteRunTrigger), TypeInfoPropertyName = "SuiteRunTrigger2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestSuiteRunResults))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestSuiteRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunAgentTestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunAllTestsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.AgentChannel?), TypeInfoPropertyName = "NullableAgentChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentLlmConfigProvider?), TypeInfoPropertyName = "NullableAgentLlmConfigProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentLlmConfigReasoningEffort?), TypeInfoPropertyName = "NullableAgentLlmConfigReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTurnHandlingConfigInterruptionSensitivity?), TypeInfoPropertyName = "NullableAgentTurnHandlingConfigInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentBackgroundNoiseConfigPreset?), TypeInfoPropertyName = "NullableAgentBackgroundNoiseConfigPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigStyle?), TypeInfoPropertyName = "NullableWidgetConfigStyle2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTheme?), TypeInfoPropertyName = "NullableWidgetConfigTheme2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigAvatarType?), TypeInfoPropertyName = "NullableWidgetConfigAvatarType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction?), TypeInfoPropertyName = "NullableAmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction?), TypeInfoPropertyName = "NullableAmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction?), TypeInfoPropertyName = "NullableAmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceType?), TypeInfoPropertyName = "NullableAgentVoiceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceModelName?), TypeInfoPropertyName = "NullableAgentVoiceModelName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentVoiceGender?), TypeInfoPropertyName = "NullableAgentVoiceGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentPhoneNumberReferenceResourceType?), TypeInfoPropertyName = "NullableAgentPhoneNumberReferenceResourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishGateResultDecision?), TypeInfoPropertyName = "NullablePublishGateResultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictOutcome?), TypeInfoPropertyName = "NullableEvaluationCaseVerdictOutcome2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictFault?), TypeInfoPropertyName = "NullableEvaluationCaseVerdictFault2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterionVerdictStatus?), TypeInfoPropertyName = "NullableEvaluationCriterionVerdictStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataCollectionFieldType?), TypeInfoPropertyName = "NullableDataCollectionFieldType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DynamicVariableType?), TypeInfoPropertyName = "NullableDynamicVariableType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStatus?), TypeInfoPropertyName = "NullableConversationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport?), TypeInfoPropertyName = "NullableConversationTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel?), TypeInfoPropertyName = "NullableConversationChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason?), TypeInfoPropertyName = "NullableConversationEndReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotReasoningEffort?), TypeInfoPropertyName = "NullableAgentSnapshotReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?), TypeInfoPropertyName = "NullableAgentSnapshotInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?), TypeInfoPropertyName = "NullableAgentSnapshotBackgroundNoisePreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationIvrSurrenderReason?), TypeInfoPropertyName = "NullableConversationIvrSurrenderReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus?), TypeInfoPropertyName = "NullableJobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolKind?), TypeInfoPropertyName = "NullableToolKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolParamType?), TypeInfoPropertyName = "NullableToolParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookToolConfigMethod?), TypeInfoPropertyName = "NullableWebhookToolConfigMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset?), TypeInfoPropertyName = "NullableLongRunningToolConfigWaitAudioPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigOnDuplicate?), TypeInfoPropertyName = "NullableLongRunningToolConfigOnDuplicate2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPTransport?), TypeInfoPropertyName = "NullableMCPTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuth?), TypeInfoPropertyName = "NullableMCPAuth2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant1Type?), TypeInfoPropertyName = "NullableMCPAuthVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant2Type?), TypeInfoPropertyName = "NullableMCPAuthVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type?), TypeInfoPropertyName = "NullableMCPAuthVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType?), TypeInfoPropertyName = "NullableMCPAuthDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass?), TypeInfoPropertyName = "NullableToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentToolConfig?), TypeInfoPropertyName = "NullableAgentToolConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass?), TypeInfoPropertyName = "NullableToolApprovalClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach?), TypeInfoPropertyName = "NullableToolReach2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentToolRequestConfig?), TypeInfoPropertyName = "NullableCreateAgentToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolderKind?), TypeInfoPropertyName = "NullableToolNameHolderKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentToolRequestConfig?), TypeInfoPropertyName = "NullableUpdateAgentToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemBuiltinInfoExecution?), TypeInfoPropertyName = "NullableSystemBuiltinInfoExecution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestType?), TypeInfoPropertyName = "NullableTestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessageRole?), TypeInfoPropertyName = "NullableSimulationMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckMode?), TypeInfoPropertyName = "NullableParameterCheckMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestVerdict?), TypeInfoPropertyName = "NullableTestVerdict2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResultSentiment?), TypeInfoPropertyName = "NullableSimulationResultSentiment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResultStatus?), TypeInfoPropertyName = "NullableSimulationCriterionResultStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResultMode?), TypeInfoPropertyName = "NullableDataAssertionResultMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SuiteRunTrigger?), TypeInfoPropertyName = "NullableSuiteRunTrigger2")] + [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))] + internal sealed partial class AgentSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AgentSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AgentSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AgentSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.MCPAuthJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.AgentToolConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.CreateAgentToolRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UpdateAgentToolRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AgentChannel) + + || typeToConvert == typeof(global::Speechify.AgentChannel?) + + || typeToConvert == typeof(global::Speechify.AgentLlmConfigProvider) + + || typeToConvert == typeof(global::Speechify.AgentLlmConfigProvider?) + + || typeToConvert == typeof(global::Speechify.AgentLlmConfigReasoningEffort) + + || typeToConvert == typeof(global::Speechify.AgentLlmConfigReasoningEffort?) + + || typeToConvert == typeof(global::Speechify.AgentTurnHandlingConfigInterruptionSensitivity) + + || typeToConvert == typeof(global::Speechify.AgentTurnHandlingConfigInterruptionSensitivity?) + + || typeToConvert == typeof(global::Speechify.AgentBackgroundNoiseConfigPreset) + + || typeToConvert == typeof(global::Speechify.AgentBackgroundNoiseConfigPreset?) + + || typeToConvert == typeof(global::Speechify.WidgetConfigStyle) + + || typeToConvert == typeof(global::Speechify.WidgetConfigStyle?) + + || typeToConvert == typeof(global::Speechify.WidgetConfigTheme) + + || typeToConvert == typeof(global::Speechify.WidgetConfigTheme?) + + || typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType) + + || typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?) + + || typeToConvert == typeof(global::Speechify.AgentVoiceType) + + || typeToConvert == typeof(global::Speechify.AgentVoiceType?) + + || typeToConvert == typeof(global::Speechify.AgentVoiceModelName) + + || typeToConvert == typeof(global::Speechify.AgentVoiceModelName?) + + || typeToConvert == typeof(global::Speechify.AgentVoiceGender) + + || typeToConvert == typeof(global::Speechify.AgentVoiceGender?) + + || typeToConvert == typeof(global::Speechify.AgentPhoneNumberReferenceResourceType) + + || typeToConvert == typeof(global::Speechify.AgentPhoneNumberReferenceResourceType?) + + || typeToConvert == typeof(global::Speechify.PublishGateResultDecision) + + || typeToConvert == typeof(global::Speechify.PublishGateResultDecision?) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome?) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault?) + + || typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus) + + || typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus?) + + || typeToConvert == typeof(global::Speechify.DataCollectionFieldType) + + || typeToConvert == typeof(global::Speechify.DataCollectionFieldType?) + + || typeToConvert == typeof(global::Speechify.DynamicVariableType) + + || typeToConvert == typeof(global::Speechify.DynamicVariableType?) + + || typeToConvert == typeof(global::Speechify.ConversationStatus) + + || typeToConvert == typeof(global::Speechify.ConversationStatus?) + + || typeToConvert == typeof(global::Speechify.ConversationTransport) + + || typeToConvert == typeof(global::Speechify.ConversationTransport?) + + || typeToConvert == typeof(global::Speechify.ConversationChannel) + + || typeToConvert == typeof(global::Speechify.ConversationChannel?) + + || typeToConvert == typeof(global::Speechify.ConversationEndReason) + + || typeToConvert == typeof(global::Speechify.ConversationEndReason?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?) + + || typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason) + + || typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason?) + + || typeToConvert == typeof(global::Speechify.JobStatus) + + || typeToConvert == typeof(global::Speechify.JobStatus?) + + || typeToConvert == typeof(global::Speechify.ToolKind) + + || typeToConvert == typeof(global::Speechify.ToolKind?) + + || typeToConvert == typeof(global::Speechify.ToolParamType) + + || typeToConvert == typeof(global::Speechify.ToolParamType?) + + || typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod) + + || typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod?) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset?) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate?) + + || typeToConvert == typeof(global::Speechify.MCPTransport) + + || typeToConvert == typeof(global::Speechify.MCPTransport?) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type?) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type?) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type?) + + || typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType) + + || typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType?) + + || typeToConvert == typeof(global::Speechify.ToolActionClass) + + || typeToConvert == typeof(global::Speechify.ToolActionClass?) + + || typeToConvert == typeof(global::Speechify.ToolApprovalClass) + + || typeToConvert == typeof(global::Speechify.ToolApprovalClass?) + + || typeToConvert == typeof(global::Speechify.ToolReach) + + || typeToConvert == typeof(global::Speechify.ToolReach?) + + || typeToConvert == typeof(global::Speechify.ToolNameHolderKind) + + || typeToConvert == typeof(global::Speechify.ToolNameHolderKind?) + + || typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution) + + || typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution?) + + || typeToConvert == typeof(global::Speechify.TestType) + + || typeToConvert == typeof(global::Speechify.TestType?) + + || typeToConvert == typeof(global::Speechify.SimulationMessageRole) + + || typeToConvert == typeof(global::Speechify.SimulationMessageRole?) + + || typeToConvert == typeof(global::Speechify.ParameterCheckMode) + + || typeToConvert == typeof(global::Speechify.ParameterCheckMode?) + + || typeToConvert == typeof(global::Speechify.TestVerdict) + + || typeToConvert == typeof(global::Speechify.TestVerdict?) + + || typeToConvert == typeof(global::Speechify.SimulationResultSentiment) + + || typeToConvert == typeof(global::Speechify.SimulationResultSentiment?) + + || typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus) + + || typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus?) + + || typeToConvert == typeof(global::Speechify.DataAssertionResultMode) + + || typeToConvert == typeof(global::Speechify.DataAssertionResultMode?) + + || typeToConvert == typeof(global::Speechify.SuiteRunTrigger) + + || typeToConvert == typeof(global::Speechify.SuiteRunTrigger?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentChannel)) + { + return new global::Speechify.JsonConverters.AgentChannelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentChannel?)) + { + return new global::Speechify.JsonConverters.AgentChannelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentLlmConfigProvider)) + { + return new global::Speechify.JsonConverters.AgentLlmConfigProviderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentLlmConfigProvider?)) + { + return new global::Speechify.JsonConverters.AgentLlmConfigProviderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentLlmConfigReasoningEffort)) + { + return new global::Speechify.JsonConverters.AgentLlmConfigReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentLlmConfigReasoningEffort?)) + { + return new global::Speechify.JsonConverters.AgentLlmConfigReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTurnHandlingConfigInterruptionSensitivity)) + { + return new global::Speechify.JsonConverters.AgentTurnHandlingConfigInterruptionSensitivityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTurnHandlingConfigInterruptionSensitivity?)) + { + return new global::Speechify.JsonConverters.AgentTurnHandlingConfigInterruptionSensitivityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentBackgroundNoiseConfigPreset)) + { + return new global::Speechify.JsonConverters.AgentBackgroundNoiseConfigPresetJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentBackgroundNoiseConfigPreset?)) + { + return new global::Speechify.JsonConverters.AgentBackgroundNoiseConfigPresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigStyle)) + { + return new global::Speechify.JsonConverters.WidgetConfigStyleJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigStyle?)) + { + return new global::Speechify.JsonConverters.WidgetConfigStyleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigTheme)) + { + return new global::Speechify.JsonConverters.WidgetConfigThemeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigTheme?)) + { + return new global::Speechify.JsonConverters.WidgetConfigThemeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType)) + { + return new global::Speechify.JsonConverters.WidgetConfigAvatarTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType?)) + { + return new global::Speechify.JsonConverters.WidgetConfigAvatarTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentVoiceType)) + { + return new global::Speechify.JsonConverters.AgentVoiceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentVoiceType?)) + { + return new global::Speechify.JsonConverters.AgentVoiceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentVoiceModelName)) + { + return new global::Speechify.JsonConverters.AgentVoiceModelNameJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentVoiceModelName?)) + { + return new global::Speechify.JsonConverters.AgentVoiceModelNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentVoiceGender)) + { + return new global::Speechify.JsonConverters.AgentVoiceGenderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentVoiceGender?)) + { + return new global::Speechify.JsonConverters.AgentVoiceGenderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentPhoneNumberReferenceResourceType)) + { + return new global::Speechify.JsonConverters.AgentPhoneNumberReferenceResourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentPhoneNumberReferenceResourceType?)) + { + return new global::Speechify.JsonConverters.AgentPhoneNumberReferenceResourceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PublishGateResultDecision)) + { + return new global::Speechify.JsonConverters.PublishGateResultDecisionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PublishGateResultDecision?)) + { + return new global::Speechify.JsonConverters.PublishGateResultDecisionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictOutcomeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome?)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictOutcomeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictFaultJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault?)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictFaultNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus)) + { + return new global::Speechify.JsonConverters.EvaluationCriterionVerdictStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus?)) + { + return new global::Speechify.JsonConverters.EvaluationCriterionVerdictStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataCollectionFieldType)) + { + return new global::Speechify.JsonConverters.DataCollectionFieldTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataCollectionFieldType?)) + { + return new global::Speechify.JsonConverters.DataCollectionFieldTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DynamicVariableType)) + { + return new global::Speechify.JsonConverters.DynamicVariableTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DynamicVariableType?)) + { + return new global::Speechify.JsonConverters.DynamicVariableTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationStatus)) + { + return new global::Speechify.JsonConverters.ConversationStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationStatus?)) + { + return new global::Speechify.JsonConverters.ConversationStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationTransport)) + { + return new global::Speechify.JsonConverters.ConversationTransportJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationTransport?)) + { + return new global::Speechify.JsonConverters.ConversationTransportNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationChannel)) + { + return new global::Speechify.JsonConverters.ConversationChannelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationChannel?)) + { + return new global::Speechify.JsonConverters.ConversationChannelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationEndReason)) + { + return new global::Speechify.JsonConverters.ConversationEndReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationEndReason?)) + { + return new global::Speechify.JsonConverters.ConversationEndReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort)) + { + return new global::Speechify.JsonConverters.AgentSnapshotReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity)) + { + return new global::Speechify.JsonConverters.AgentSnapshotInterruptionSensitivityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotInterruptionSensitivityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset)) + { + return new global::Speechify.JsonConverters.AgentSnapshotBackgroundNoisePresetJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotBackgroundNoisePresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason)) + { + return new global::Speechify.JsonConverters.ConversationIvrSurrenderReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason?)) + { + return new global::Speechify.JsonConverters.ConversationIvrSurrenderReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus)) + { + return new global::Speechify.JsonConverters.JobStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus?)) + { + return new global::Speechify.JsonConverters.JobStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolKind)) + { + return new global::Speechify.JsonConverters.ToolKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolKind?)) + { + return new global::Speechify.JsonConverters.ToolKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolParamType)) + { + return new global::Speechify.JsonConverters.ToolParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolParamType?)) + { + return new global::Speechify.JsonConverters.ToolParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod)) + { + return new global::Speechify.JsonConverters.WebhookToolConfigMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod?)) + { + return new global::Speechify.JsonConverters.WebhookToolConfigMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigWaitAudioPresetJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset?)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigWaitAudioPresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigOnDuplicateJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate?)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigOnDuplicateNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPTransport)) + { + return new global::Speechify.JsonConverters.MCPTransportJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPTransport?)) + { + return new global::Speechify.JsonConverters.MCPTransportNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type?)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type?)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type?)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType)) + { + return new global::Speechify.JsonConverters.MCPAuthDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType?)) + { + return new global::Speechify.JsonConverters.MCPAuthDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolActionClass)) + { + return new global::Speechify.JsonConverters.ToolActionClassJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolActionClass?)) + { + return new global::Speechify.JsonConverters.ToolActionClassNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass)) + { + return new global::Speechify.JsonConverters.ToolApprovalClassJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass?)) + { + return new global::Speechify.JsonConverters.ToolApprovalClassNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolReach)) + { + return new global::Speechify.JsonConverters.ToolReachJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolReach?)) + { + return new global::Speechify.JsonConverters.ToolReachNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolNameHolderKind)) + { + return new global::Speechify.JsonConverters.ToolNameHolderKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolNameHolderKind?)) + { + return new global::Speechify.JsonConverters.ToolNameHolderKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution)) + { + return new global::Speechify.JsonConverters.SystemBuiltinInfoExecutionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution?)) + { + return new global::Speechify.JsonConverters.SystemBuiltinInfoExecutionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestType)) + { + return new global::Speechify.JsonConverters.TestTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestType?)) + { + return new global::Speechify.JsonConverters.TestTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationMessageRole)) + { + return new global::Speechify.JsonConverters.SimulationMessageRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationMessageRole?)) + { + return new global::Speechify.JsonConverters.SimulationMessageRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ParameterCheckMode)) + { + return new global::Speechify.JsonConverters.ParameterCheckModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ParameterCheckMode?)) + { + return new global::Speechify.JsonConverters.ParameterCheckModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestVerdict)) + { + return new global::Speechify.JsonConverters.TestVerdictJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestVerdict?)) + { + return new global::Speechify.JsonConverters.TestVerdictNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationResultSentiment)) + { + return new global::Speechify.JsonConverters.SimulationResultSentimentJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationResultSentiment?)) + { + return new global::Speechify.JsonConverters.SimulationResultSentimentNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus)) + { + return new global::Speechify.JsonConverters.SimulationCriterionResultStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus?)) + { + return new global::Speechify.JsonConverters.SimulationCriterionResultStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataAssertionResultMode)) + { + return new global::Speechify.JsonConverters.DataAssertionResultModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataAssertionResultMode?)) + { + return new global::Speechify.JsonConverters.DataAssertionResultModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SuiteRunTrigger)) + { + return new global::Speechify.JsonConverters.SuiteRunTriggerJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SuiteRunTrigger?)) + { + return new global::Speechify.JsonConverters.SuiteRunTriggerNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AgentSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AgentClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AgentClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..da1cbfe --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AgentClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AgentClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AgentClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..f77111d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AgentClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentClient + { + /// + + public AgentClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.AgentClient.g.cs b/src/libs/Speechify/Generated/Speechify.AgentClient.g.cs index ce83776..f83a6e5 100644 --- a/src/libs/Speechify/Generated/Speechify.AgentClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AgentClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class AgentClient : global::Speechify.IAgentClient, global /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.AgentSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Agents.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Agents.JsonSerializerContext.g.cs new file mode 100644 index 0000000..687a3a0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Agents.JsonSerializerContext.g.cs @@ -0,0 +1,174 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSkill))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentSkillsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachSkillRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentSkillRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class AgentsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AgentsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AgentsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AgentsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AgentsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AgentsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AgentsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..0f9c292 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AgentsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AgentsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AgentsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..2fe4f4a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AgentsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentsClient + { + /// + + public AgentsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.AgentsClient.g.cs b/src/libs/Speechify/Generated/Speechify.AgentsClient.g.cs index 4187f08..958f04b 100644 --- a/src/libs/Speechify/Generated/Speechify.AgentsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AgentsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class AgentsClient : global::Speechify.IAgentsClient, glob /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.AgentsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Audio.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Audio.JsonSerializerContext.g.cs new file mode 100644 index 0000000..21b3a88 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Audio.JsonSerializerContext.g.cs @@ -0,0 +1,377 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequestAudioFormat), TypeInfoPropertyName = "GetSpeechRequestAudioFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequestModel), TypeInfoPropertyName = "GetSpeechRequestModel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechOptionsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AudioOutputFormat), TypeInfoPropertyName = "AudioOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechResponseAudioFormat), TypeInfoPropertyName = "GetSpeechResponseAudioFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.NestedChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechMarks))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AudioStreamPostParametersAccept), TypeInfoPropertyName = "V1AudioStreamPostParametersAccept2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetStreamRequestModel), TypeInfoPropertyName = "GetStreamRequestModel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetStreamOptionsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AudioStreamOutputFormat), TypeInfoPropertyName = "AudioStreamOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetStreamRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AudioStreamWithTimestampsPostParametersAccept), TypeInfoPropertyName = "V1AudioStreamWithTimestampsPostParametersAccept2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEvent), TypeInfoPropertyName = "SpeechStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant1Type), TypeInfoPropertyName = "SpeechStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant2Type), TypeInfoPropertyName = "SpeechStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant3Type), TypeInfoPropertyName = "SpeechStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventDiscriminatorType), TypeInfoPropertyName = "SpeechStreamEventDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequestAudioFormat?), TypeInfoPropertyName = "NullableGetSpeechRequestAudioFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequestModel?), TypeInfoPropertyName = "NullableGetSpeechRequestModel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AudioOutputFormat?), TypeInfoPropertyName = "NullableAudioOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechResponseAudioFormat?), TypeInfoPropertyName = "NullableGetSpeechResponseAudioFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AudioStreamPostParametersAccept?), TypeInfoPropertyName = "NullableV1AudioStreamPostParametersAccept2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetStreamRequestModel?), TypeInfoPropertyName = "NullableGetStreamRequestModel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AudioStreamOutputFormat?), TypeInfoPropertyName = "NullableAudioStreamOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AudioStreamWithTimestampsPostParametersAccept?), TypeInfoPropertyName = "NullableV1AudioStreamWithTimestampsPostParametersAccept2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEvent?), TypeInfoPropertyName = "NullableSpeechStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant1Type?), TypeInfoPropertyName = "NullableSpeechStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant2Type?), TypeInfoPropertyName = "NullableSpeechStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventVariant3Type?), TypeInfoPropertyName = "NullableSpeechStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SpeechStreamEventDiscriminatorType?), TypeInfoPropertyName = "NullableSpeechStreamEventDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class AudioSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AudioSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AudioSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AudioSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.SpeechStreamEventJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.GetSpeechRequestAudioFormat) + + || typeToConvert == typeof(global::Speechify.GetSpeechRequestAudioFormat?) + + || typeToConvert == typeof(global::Speechify.GetSpeechRequestModel) + + || typeToConvert == typeof(global::Speechify.GetSpeechRequestModel?) + + || typeToConvert == typeof(global::Speechify.AudioOutputFormat) + + || typeToConvert == typeof(global::Speechify.AudioOutputFormat?) + + || typeToConvert == typeof(global::Speechify.GetSpeechResponseAudioFormat) + + || typeToConvert == typeof(global::Speechify.GetSpeechResponseAudioFormat?) + + || typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.V1AudioStreamPostParametersAccept) + + || typeToConvert == typeof(global::Speechify.V1AudioStreamPostParametersAccept?) + + || typeToConvert == typeof(global::Speechify.GetStreamRequestModel) + + || typeToConvert == typeof(global::Speechify.GetStreamRequestModel?) + + || typeToConvert == typeof(global::Speechify.AudioStreamOutputFormat) + + || typeToConvert == typeof(global::Speechify.AudioStreamOutputFormat?) + + || typeToConvert == typeof(global::Speechify.V1AudioStreamWithTimestampsPostParametersAccept) + + || typeToConvert == typeof(global::Speechify.V1AudioStreamWithTimestampsPostParametersAccept?) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant1Type) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant1Type?) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant2Type) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant2Type?) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant3Type) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant3Type?) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventDiscriminatorType) + + || typeToConvert == typeof(global::Speechify.SpeechStreamEventDiscriminatorType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.GetSpeechRequestAudioFormat)) + { + return new global::Speechify.JsonConverters.GetSpeechRequestAudioFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetSpeechRequestAudioFormat?)) + { + return new global::Speechify.JsonConverters.GetSpeechRequestAudioFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetSpeechRequestModel)) + { + return new global::Speechify.JsonConverters.GetSpeechRequestModelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetSpeechRequestModel?)) + { + return new global::Speechify.JsonConverters.GetSpeechRequestModelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AudioOutputFormat)) + { + return new global::Speechify.JsonConverters.AudioOutputFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AudioOutputFormat?)) + { + return new global::Speechify.JsonConverters.AudioOutputFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetSpeechResponseAudioFormat)) + { + return new global::Speechify.JsonConverters.GetSpeechResponseAudioFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetSpeechResponseAudioFormat?)) + { + return new global::Speechify.JsonConverters.GetSpeechResponseAudioFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AudioStreamPostParametersAccept)) + { + return new global::Speechify.JsonConverters.V1AudioStreamPostParametersAcceptJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AudioStreamPostParametersAccept?)) + { + return new global::Speechify.JsonConverters.V1AudioStreamPostParametersAcceptNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetStreamRequestModel)) + { + return new global::Speechify.JsonConverters.GetStreamRequestModelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetStreamRequestModel?)) + { + return new global::Speechify.JsonConverters.GetStreamRequestModelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AudioStreamOutputFormat)) + { + return new global::Speechify.JsonConverters.AudioStreamOutputFormatJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AudioStreamOutputFormat?)) + { + return new global::Speechify.JsonConverters.AudioStreamOutputFormatNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AudioStreamWithTimestampsPostParametersAccept)) + { + return new global::Speechify.JsonConverters.V1AudioStreamWithTimestampsPostParametersAcceptJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AudioStreamWithTimestampsPostParametersAccept?)) + { + return new global::Speechify.JsonConverters.V1AudioStreamWithTimestampsPostParametersAcceptNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant1Type)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant1Type?)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant2Type)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant2Type?)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant3Type)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventVariant3Type?)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventDiscriminatorType)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SpeechStreamEventDiscriminatorType?)) + { + return new global::Speechify.JsonConverters.SpeechStreamEventDiscriminatorTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AudioSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AudioAssets.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.AudioAssets.JsonSerializerContext.g.cs new file mode 100644 index 0000000..0734a3a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AudioAssets.JsonSerializerContext.g.cs @@ -0,0 +1,174 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.AudioAsset))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAudioAssetsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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::System.Collections.Generic.List))] + internal sealed partial class AudioAssetsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class AudioAssetsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static AudioAssetsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private AudioAssetsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new AudioAssetsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..7503a18 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AudioAssetsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..7cd19ef --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AudioAssetsClient + { + /// + + public AudioAssetsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.AudioAssetsClient.g.cs b/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.g.cs index 52a915d..f3dcf43 100644 --- a/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AudioAssetsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class AudioAssetsClient : global::Speechify.IAudioAssetsCl /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.AudioAssetsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.AudioClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AudioClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..34b87eb --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AudioClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AudioClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.AudioClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.AudioClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..1efa342 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.AudioClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class AudioClient + { + /// + + public AudioClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.AudioClient.g.cs b/src/libs/Speechify/Generated/Speechify.AudioClient.g.cs index b94f6e4..5b56978 100644 --- a/src/libs/Speechify/Generated/Speechify.AudioClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AudioClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class AudioClient : global::Speechify.IAudioClient, global /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.AudioSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.BatchCalls.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.BatchCalls.JsonSerializerContext.g.cs new file mode 100644 index 0000000..c28d97c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.BatchCalls.JsonSerializerContext.g.cs @@ -0,0 +1,210 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.JobStatus), TypeInfoPropertyName = "JobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchCall))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListBatchCallsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchRecipientRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateBatchCallRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchRecipientStatus), TypeInfoPropertyName = "BatchRecipientStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchRecipient))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListBatchRecipientsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.JobStatus?), TypeInfoPropertyName = "NullableJobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchRecipientStatus?), TypeInfoPropertyName = "NullableBatchRecipientStatus2")] + [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))] + internal sealed partial class BatchCallsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class BatchCallsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static BatchCallsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private BatchCallsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.JobStatus) + + || typeToConvert == typeof(global::Speechify.JobStatus?) + + || typeToConvert == typeof(global::Speechify.BatchRecipientStatus) + + || typeToConvert == typeof(global::Speechify.BatchRecipientStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus)) + { + return new global::Speechify.JsonConverters.JobStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus?)) + { + return new global::Speechify.JsonConverters.JobStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.BatchRecipientStatus)) + { + return new global::Speechify.JsonConverters.BatchRecipientStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.BatchRecipientStatus?)) + { + return new global::Speechify.JsonConverters.BatchRecipientStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new BatchCallsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.BatchCallsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.BatchCallsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..e7f50bc --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.BatchCallsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class BatchCallsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.BatchCallsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.BatchCallsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..18c9f7c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.BatchCallsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class BatchCallsClient + { + /// + + public BatchCallsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.BatchCallsClient.g.cs b/src/libs/Speechify/Generated/Speechify.BatchCallsClient.g.cs index b6a838b..a0f95f5 100644 --- a/src/libs/Speechify/Generated/Speechify.BatchCallsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.BatchCallsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class BatchCallsClient : global::Speechify.IBatchCallsClie /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.BatchCallsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Callers.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Callers.JsonSerializerContext.g.cs new file mode 100644 index 0000000..8feadc9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Callers.JsonSerializerContext.g.cs @@ -0,0 +1,389 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.AgentChannel), TypeInfoPropertyName = "AgentChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentAdditionalLanguage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction), TypeInfoPropertyName = "AmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction), TypeInfoPropertyName = "AmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvr))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction), TypeInfoPropertyName = "AmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailable))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigTuning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AMDConfig))] + [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.ConversationStatus), TypeInfoPropertyName = "ConversationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport), TypeInfoPropertyName = "ConversationTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel), TypeInfoPropertyName = "ConversationChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason), TypeInfoPropertyName = "ConversationEndReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkillPin))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotReasoningEffort), TypeInfoPropertyName = "AgentSnapshotReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity), TypeInfoPropertyName = "AgentSnapshotInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset), TypeInfoPropertyName = "AgentSnapshotBackgroundNoisePreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshot))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationIvrSurrenderReason), TypeInfoPropertyName = "ConversationIvrSurrenderReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Conversation))] + [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.Memory))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Caller))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListCallersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateCallerRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DeleteCallerResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListCallerConversationsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListCallerMemoriesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.AgentChannel?), TypeInfoPropertyName = "NullableAgentChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction?), TypeInfoPropertyName = "NullableAmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction?), TypeInfoPropertyName = "NullableAmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction?), TypeInfoPropertyName = "NullableAmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStatus?), TypeInfoPropertyName = "NullableConversationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport?), TypeInfoPropertyName = "NullableConversationTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel?), TypeInfoPropertyName = "NullableConversationChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason?), TypeInfoPropertyName = "NullableConversationEndReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotReasoningEffort?), TypeInfoPropertyName = "NullableAgentSnapshotReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?), TypeInfoPropertyName = "NullableAgentSnapshotInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?), TypeInfoPropertyName = "NullableAgentSnapshotBackgroundNoisePreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationIvrSurrenderReason?), TypeInfoPropertyName = "NullableConversationIvrSurrenderReason2")] + [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))] + internal sealed partial class CallersSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class CallersSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static CallersSourceGenerationContext Default { get; } = new(DefaultOptions); + + private CallersSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AgentChannel) + + || typeToConvert == typeof(global::Speechify.AgentChannel?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?) + + || typeToConvert == typeof(global::Speechify.ConversationStatus) + + || typeToConvert == typeof(global::Speechify.ConversationStatus?) + + || typeToConvert == typeof(global::Speechify.ConversationTransport) + + || typeToConvert == typeof(global::Speechify.ConversationTransport?) + + || typeToConvert == typeof(global::Speechify.ConversationChannel) + + || typeToConvert == typeof(global::Speechify.ConversationChannel?) + + || typeToConvert == typeof(global::Speechify.ConversationEndReason) + + || typeToConvert == typeof(global::Speechify.ConversationEndReason?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?) + + || typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason) + + || typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentChannel)) + { + return new global::Speechify.JsonConverters.AgentChannelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentChannel?)) + { + return new global::Speechify.JsonConverters.AgentChannelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationStatus)) + { + return new global::Speechify.JsonConverters.ConversationStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationStatus?)) + { + return new global::Speechify.JsonConverters.ConversationStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationTransport)) + { + return new global::Speechify.JsonConverters.ConversationTransportJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationTransport?)) + { + return new global::Speechify.JsonConverters.ConversationTransportNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationChannel)) + { + return new global::Speechify.JsonConverters.ConversationChannelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationChannel?)) + { + return new global::Speechify.JsonConverters.ConversationChannelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationEndReason)) + { + return new global::Speechify.JsonConverters.ConversationEndReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationEndReason?)) + { + return new global::Speechify.JsonConverters.ConversationEndReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort)) + { + return new global::Speechify.JsonConverters.AgentSnapshotReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity)) + { + return new global::Speechify.JsonConverters.AgentSnapshotInterruptionSensitivityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotInterruptionSensitivityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset)) + { + return new global::Speechify.JsonConverters.AgentSnapshotBackgroundNoisePresetJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotBackgroundNoisePresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason)) + { + return new global::Speechify.JsonConverters.ConversationIvrSurrenderReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason?)) + { + return new global::Speechify.JsonConverters.ConversationIvrSurrenderReasonNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new CallersSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CallersClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.CallersClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..6d94673 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CallersClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class CallersClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CallersClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.CallersClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..1bb360f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CallersClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class CallersClient + { + /// + + public CallersClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.CallersClient.g.cs b/src/libs/Speechify/Generated/Speechify.CallersClient.g.cs index c68f329..5a96232 100644 --- a/src/libs/Speechify/Generated/Speechify.CallersClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.CallersClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class CallersClient : global::Speechify.ICallersClient, gl /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.CallersSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ConsentChallenges.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.ConsentChallenges.JsonSerializerContext.g.cs new file mode 100644 index 0000000..199a96f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ConsentChallenges.JsonSerializerContext.g.cs @@ -0,0 +1,164 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateConsentChallengeRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConsentChallenge))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + internal sealed partial class ConsentChallengesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ConsentChallengesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ConsentChallengesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ConsentChallengesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ConsentChallengesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..e428c77 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ConsentChallengesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..4eb79a6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ConsentChallengesClient + { + /// + + public ConsentChallengesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ConsentChallengesClient.g.cs b/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.g.cs index 98bdafb..9dc4c34 100644 --- a/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ConsentChallengesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ConsentChallengesClient : global::Speechify.IConsent /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ConsentChallengesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Contacts.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Contacts.JsonSerializerContext.g.cs new file mode 100644 index 0000000..50ca47e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Contacts.JsonSerializerContext.g.cs @@ -0,0 +1,233 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifierKind), TypeInfoPropertyName = "ContactIdentifierKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifierAssertedBy), TypeInfoPropertyName = "ContactIdentifierAssertedBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifier))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Contact))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListContactsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateContactRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DeleteContactResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachContactIdentifierRequestKind), TypeInfoPropertyName = "AttachContactIdentifierRequestKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachContactIdentifierRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MergeContactsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MergeContactsResponseMerged))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MergeContactsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactResolver))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PutContactResolverRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.ContactIdentifierKind?), TypeInfoPropertyName = "NullableContactIdentifierKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifierAssertedBy?), TypeInfoPropertyName = "NullableContactIdentifierAssertedBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachContactIdentifierRequestKind?), TypeInfoPropertyName = "NullableAttachContactIdentifierRequestKind2")] + [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))] + internal sealed partial class ContactsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ContactsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ContactsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ContactsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.ContactIdentifierKind) + + || typeToConvert == typeof(global::Speechify.ContactIdentifierKind?) + + || typeToConvert == typeof(global::Speechify.ContactIdentifierAssertedBy) + + || typeToConvert == typeof(global::Speechify.ContactIdentifierAssertedBy?) + + || typeToConvert == typeof(global::Speechify.AttachContactIdentifierRequestKind) + + || typeToConvert == typeof(global::Speechify.AttachContactIdentifierRequestKind?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ContactIdentifierKind)) + { + return new global::Speechify.JsonConverters.ContactIdentifierKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ContactIdentifierKind?)) + { + return new global::Speechify.JsonConverters.ContactIdentifierKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ContactIdentifierAssertedBy)) + { + return new global::Speechify.JsonConverters.ContactIdentifierAssertedByJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ContactIdentifierAssertedBy?)) + { + return new global::Speechify.JsonConverters.ContactIdentifierAssertedByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AttachContactIdentifierRequestKind)) + { + return new global::Speechify.JsonConverters.AttachContactIdentifierRequestKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AttachContactIdentifierRequestKind?)) + { + return new global::Speechify.JsonConverters.AttachContactIdentifierRequestKindNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ContactsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ContactsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ContactsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..41a745d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ContactsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ContactsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ContactsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ContactsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..7ec0af2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ContactsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ContactsClient + { + /// + + public ContactsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ContactsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ContactsClient.g.cs index cdd85fe..000cbb1 100644 --- a/src/libs/Speechify/Generated/Speechify.ContactsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ContactsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ContactsClient : global::Speechify.IContactsClient, /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ContactsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Conversations.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Conversations.JsonSerializerContext.g.cs new file mode 100644 index 0000000..2768087 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Conversations.JsonSerializerContext.g.cs @@ -0,0 +1,527 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentChannel), TypeInfoPropertyName = "AgentChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentAdditionalLanguage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction), TypeInfoPropertyName = "AmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction), TypeInfoPropertyName = "AmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvr))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction), TypeInfoPropertyName = "AmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailable))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigTuning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AMDConfig))] + [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.ConversationStatus), TypeInfoPropertyName = "ConversationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport), TypeInfoPropertyName = "ConversationTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel), TypeInfoPropertyName = "ConversationChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason), TypeInfoPropertyName = "ConversationEndReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkillPin))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotReasoningEffort), TypeInfoPropertyName = "AgentSnapshotReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity), TypeInfoPropertyName = "AgentSnapshotInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset), TypeInfoPropertyName = "AgentSnapshotBackgroundNoisePreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshot))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationIvrSurrenderReason), TypeInfoPropertyName = "ConversationIvrSurrenderReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Conversation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListConversationsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RecentCallee))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListRecentCalleesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStats))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MessageRole), TypeInfoPropertyName = "MessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MessageInitiatedBy), TypeInfoPropertyName = "MessageInitiatedBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Message))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListMessagesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationKind), TypeInfoPropertyName = "EvaluationKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationStatus), TypeInfoPropertyName = "EvaluationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Evaluation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListEvaluationsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Memory))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListMemoriesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SearchHitRanking))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RetrievalLogResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RetrievalCoverage), TypeInfoPropertyName = "RetrievalCoverage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RetrievalLogEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListRetrievalLogsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookDeliveryStatus), TypeInfoPropertyName = "WebhookDeliveryStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookDelivery))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListWebhookDeliveriesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationPromptRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus), TypeInfoPropertyName = "JobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationPrompt))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.AgentChannel?), TypeInfoPropertyName = "NullableAgentChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction?), TypeInfoPropertyName = "NullableAmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction?), TypeInfoPropertyName = "NullableAmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction?), TypeInfoPropertyName = "NullableAmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStatus?), TypeInfoPropertyName = "NullableConversationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport?), TypeInfoPropertyName = "NullableConversationTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel?), TypeInfoPropertyName = "NullableConversationChannel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason?), TypeInfoPropertyName = "NullableConversationEndReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotReasoningEffort?), TypeInfoPropertyName = "NullableAgentSnapshotReasoningEffort2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?), TypeInfoPropertyName = "NullableAgentSnapshotInterruptionSensitivity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?), TypeInfoPropertyName = "NullableAgentSnapshotBackgroundNoisePreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationIvrSurrenderReason?), TypeInfoPropertyName = "NullableConversationIvrSurrenderReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MessageRole?), TypeInfoPropertyName = "NullableMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MessageInitiatedBy?), TypeInfoPropertyName = "NullableMessageInitiatedBy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationKind?), TypeInfoPropertyName = "NullableEvaluationKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationStatus?), TypeInfoPropertyName = "NullableEvaluationStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RetrievalCoverage?), TypeInfoPropertyName = "NullableRetrievalCoverage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookDeliveryStatus?), TypeInfoPropertyName = "NullableWebhookDeliveryStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus?), TypeInfoPropertyName = "NullableJobStatus2")] + [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))] + internal sealed partial class ConversationsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ConversationsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ConversationsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ConversationsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AgentChannel) + + || typeToConvert == typeof(global::Speechify.AgentChannel?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?) + + || typeToConvert == typeof(global::Speechify.ConversationStatus) + + || typeToConvert == typeof(global::Speechify.ConversationStatus?) + + || typeToConvert == typeof(global::Speechify.ConversationTransport) + + || typeToConvert == typeof(global::Speechify.ConversationTransport?) + + || typeToConvert == typeof(global::Speechify.ConversationChannel) + + || typeToConvert == typeof(global::Speechify.ConversationChannel?) + + || typeToConvert == typeof(global::Speechify.ConversationEndReason) + + || typeToConvert == typeof(global::Speechify.ConversationEndReason?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset) + + || typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?) + + || typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason) + + || typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason?) + + || typeToConvert == typeof(global::Speechify.MessageRole) + + || typeToConvert == typeof(global::Speechify.MessageRole?) + + || typeToConvert == typeof(global::Speechify.MessageInitiatedBy) + + || typeToConvert == typeof(global::Speechify.MessageInitiatedBy?) + + || typeToConvert == typeof(global::Speechify.EvaluationKind) + + || typeToConvert == typeof(global::Speechify.EvaluationKind?) + + || typeToConvert == typeof(global::Speechify.EvaluationStatus) + + || typeToConvert == typeof(global::Speechify.EvaluationStatus?) + + || typeToConvert == typeof(global::Speechify.RetrievalCoverage) + + || typeToConvert == typeof(global::Speechify.RetrievalCoverage?) + + || typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus) + + || typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus?) + + || typeToConvert == typeof(global::Speechify.JobStatus) + + || typeToConvert == typeof(global::Speechify.JobStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentChannel)) + { + return new global::Speechify.JsonConverters.AgentChannelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentChannel?)) + { + return new global::Speechify.JsonConverters.AgentChannelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationStatus)) + { + return new global::Speechify.JsonConverters.ConversationStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationStatus?)) + { + return new global::Speechify.JsonConverters.ConversationStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationTransport)) + { + return new global::Speechify.JsonConverters.ConversationTransportJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationTransport?)) + { + return new global::Speechify.JsonConverters.ConversationTransportNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationChannel)) + { + return new global::Speechify.JsonConverters.ConversationChannelJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationChannel?)) + { + return new global::Speechify.JsonConverters.ConversationChannelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationEndReason)) + { + return new global::Speechify.JsonConverters.ConversationEndReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationEndReason?)) + { + return new global::Speechify.JsonConverters.ConversationEndReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort)) + { + return new global::Speechify.JsonConverters.AgentSnapshotReasoningEffortJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotReasoningEffort?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotReasoningEffortNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity)) + { + return new global::Speechify.JsonConverters.AgentSnapshotInterruptionSensitivityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotInterruptionSensitivityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset)) + { + return new global::Speechify.JsonConverters.AgentSnapshotBackgroundNoisePresetJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?)) + { + return new global::Speechify.JsonConverters.AgentSnapshotBackgroundNoisePresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason)) + { + return new global::Speechify.JsonConverters.ConversationIvrSurrenderReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ConversationIvrSurrenderReason?)) + { + return new global::Speechify.JsonConverters.ConversationIvrSurrenderReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MessageRole)) + { + return new global::Speechify.JsonConverters.MessageRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MessageRole?)) + { + return new global::Speechify.JsonConverters.MessageRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MessageInitiatedBy)) + { + return new global::Speechify.JsonConverters.MessageInitiatedByJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MessageInitiatedBy?)) + { + return new global::Speechify.JsonConverters.MessageInitiatedByNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationKind)) + { + return new global::Speechify.JsonConverters.EvaluationKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationKind?)) + { + return new global::Speechify.JsonConverters.EvaluationKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationStatus)) + { + return new global::Speechify.JsonConverters.EvaluationStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationStatus?)) + { + return new global::Speechify.JsonConverters.EvaluationStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RetrievalCoverage)) + { + return new global::Speechify.JsonConverters.RetrievalCoverageJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RetrievalCoverage?)) + { + return new global::Speechify.JsonConverters.RetrievalCoverageNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus)) + { + return new global::Speechify.JsonConverters.WebhookDeliveryStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus?)) + { + return new global::Speechify.JsonConverters.WebhookDeliveryStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus)) + { + return new global::Speechify.JsonConverters.JobStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus?)) + { + return new global::Speechify.JsonConverters.JobStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ConversationsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ConversationsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..7c36f94 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ConversationsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ConversationsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..23cd441 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ConversationsClient + { + /// + + public ConversationsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ConversationsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs index d52fdce..7229960 100644 --- a/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs @@ -97,7 +97,9 @@ partial void ProcessListResponseContent( /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -107,8 +109,8 @@ partial void ProcessListResponseContent( /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// @@ -192,7 +194,9 @@ partial void ProcessListResponseContent( /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -202,8 +206,8 @@ partial void ProcessListResponseContent( /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs index c8ee4fa..82dfaab 100644 --- a/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs @@ -83,7 +83,9 @@ partial void ProcessStatsResponseContent( /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -93,8 +95,8 @@ partial void ProcessStatsResponseContent( /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// @@ -164,7 +166,9 @@ partial void ProcessStatsResponseContent( /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -174,8 +178,8 @@ partial void ProcessStatsResponseContent( /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ConversationsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.g.cs index 95064fa..f9826f9 100644 --- a/src/libs/Speechify/Generated/Speechify.ConversationsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ConversationsClient : global::Speechify.IConversatio /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ConversationsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Documents.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Documents.JsonSerializerContext.g.cs new file mode 100644 index 0000000..a7d1fd1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Documents.JsonSerializerContext.g.cs @@ -0,0 +1,278 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.StoreDocumentSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.QueryStoreDocumentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WriteStoreDocumentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreWhereClauseOp), TypeInfoPropertyName = "StoreWhereClauseOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreWhereClause))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreOrderByDirection), TypeInfoPropertyName = "StoreOrderByDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreOrderBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreDocumentQuery))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateMetricOp), TypeInfoPropertyName = "StoreAggregateMetricOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateMetric))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateQuery))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateGroup))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWriteOp), TypeInfoPropertyName = "StoreBatchWriteOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWrite))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResultOp), TypeInfoPropertyName = "StoreBatchResultOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.StoreWhereClauseOp?), TypeInfoPropertyName = "NullableStoreWhereClauseOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreOrderByDirection?), TypeInfoPropertyName = "NullableStoreOrderByDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateMetricOp?), TypeInfoPropertyName = "NullableStoreAggregateMetricOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWriteOp?), TypeInfoPropertyName = "NullableStoreBatchWriteOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResultOp?), TypeInfoPropertyName = "NullableStoreBatchResultOp2")] + [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))] + internal sealed partial class DocumentsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class DocumentsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static DocumentsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private DocumentsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.StoreWhereClauseOp) + + || typeToConvert == typeof(global::Speechify.StoreWhereClauseOp?) + + || typeToConvert == typeof(global::Speechify.StoreOrderByDirection) + + || typeToConvert == typeof(global::Speechify.StoreOrderByDirection?) + + || typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp) + + || typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp?) + + || typeToConvert == typeof(global::Speechify.StoreBatchWriteOp) + + || typeToConvert == typeof(global::Speechify.StoreBatchWriteOp?) + + || typeToConvert == typeof(global::Speechify.StoreBatchResultOp) + + || typeToConvert == typeof(global::Speechify.StoreBatchResultOp?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreWhereClauseOp)) + { + return new global::Speechify.JsonConverters.StoreWhereClauseOpJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreWhereClauseOp?)) + { + return new global::Speechify.JsonConverters.StoreWhereClauseOpNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreOrderByDirection)) + { + return new global::Speechify.JsonConverters.StoreOrderByDirectionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreOrderByDirection?)) + { + return new global::Speechify.JsonConverters.StoreOrderByDirectionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp)) + { + return new global::Speechify.JsonConverters.StoreAggregateMetricOpJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp?)) + { + return new global::Speechify.JsonConverters.StoreAggregateMetricOpNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreBatchWriteOp)) + { + return new global::Speechify.JsonConverters.StoreBatchWriteOpJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreBatchWriteOp?)) + { + return new global::Speechify.JsonConverters.StoreBatchWriteOpNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreBatchResultOp)) + { + return new global::Speechify.JsonConverters.StoreBatchResultOpJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreBatchResultOp?)) + { + return new global::Speechify.JsonConverters.StoreBatchResultOpNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new DocumentsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..6a4cf63 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class DocumentsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..f5ef082 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class DocumentsClient + { + /// + + public DocumentsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.DocumentsClient.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.g.cs index 54b40df..fd0022f 100644 --- a/src/libs/Speechify/Generated/Speechify.DocumentsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class DocumentsClient : global::Speechify.IDocumentsClient /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.DocumentsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Endpoints.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Endpoints.JsonSerializerContext.g.cs new file mode 100644 index 0000000..c83c71c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Endpoints.JsonSerializerContext.g.cs @@ -0,0 +1,194 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookDeliveryStatus), TypeInfoPropertyName = "WebhookDeliveryStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookEndpoint))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListWebhookEndpointsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateWebhookEndpointRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateWebhookEndpointRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookEndpointDelivery))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListWebhookEndpointDeliveriesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.WebhookDeliveryStatus?), TypeInfoPropertyName = "NullableWebhookDeliveryStatus2")] + [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))] + internal sealed partial class EndpointsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class EndpointsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static EndpointsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private EndpointsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus) + + || typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus)) + { + return new global::Speechify.JsonConverters.WebhookDeliveryStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookDeliveryStatus?)) + { + return new global::Speechify.JsonConverters.WebhookDeliveryStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new EndpointsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.EndpointsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.EndpointsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..d1125a9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.EndpointsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class EndpointsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.EndpointsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.EndpointsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..047473a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.EndpointsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class EndpointsClient + { + /// + + public EndpointsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.EndpointsClient.g.cs b/src/libs/Speechify/Generated/Speechify.EndpointsClient.g.cs index af4a11f..7eaeff9 100644 --- a/src/libs/Speechify/Generated/Speechify.EndpointsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.EndpointsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class EndpointsClient : global::Speechify.IEndpointsClient /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.EndpointsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Files.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Files.JsonSerializerContext.g.cs new file mode 100644 index 0000000..8c9d48c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Files.JsonSerializerContext.g.cs @@ -0,0 +1,223 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.V1FilesGetParametersKind), TypeInfoPropertyName = "V1FilesGetParametersKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FileKind), TypeInfoPropertyName = "FileKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FileSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.File))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListFilesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind), TypeInfoPropertyName = "V1FilesPostRequestBodyContentMultipartFormDataSchemaKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadRequest2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.V1FilesGetParametersKind?), TypeInfoPropertyName = "NullableV1FilesGetParametersKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FileKind?), TypeInfoPropertyName = "NullableFileKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?), TypeInfoPropertyName = "NullableV1FilesPostRequestBodyContentMultipartFormDataSchemaKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class FilesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class FilesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static FilesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private FilesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind) + + || typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind?) + + || typeToConvert == typeof(global::Speechify.FileKind) + + || typeToConvert == typeof(global::Speechify.FileKind?) + + || typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind) + + || typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind)) + { + return new global::Speechify.JsonConverters.V1FilesGetParametersKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind?)) + { + return new global::Speechify.JsonConverters.V1FilesGetParametersKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.FileKind)) + { + return new global::Speechify.JsonConverters.FileKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.FileKind?)) + { + return new global::Speechify.JsonConverters.FileKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind)) + { + return new global::Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?)) + { + return new global::Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new FilesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.FilesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..f9cd7e5 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class FilesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.FilesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..7a082ce --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class FilesClient + { + /// + + public FilesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.FilesClient.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.g.cs index 9c66608..92074f8 100644 --- a/src/libs/Speechify/Generated/Speechify.FilesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class FilesClient : global::Speechify.IFilesClient, global /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.FilesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Flow.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Flow.JsonSerializerContext.g.cs new file mode 100644 index 0000000..3436c82 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Flow.JsonSerializerContext.g.cs @@ -0,0 +1,288 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.AgentFlowGetSchemaResponse200))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishGateResultDecision), TypeInfoPropertyName = "PublishGateResultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictOutcome), TypeInfoPropertyName = "EvaluationCaseVerdictOutcome2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictFault), TypeInfoPropertyName = "EvaluationCaseVerdictFault2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterionVerdictStatus), TypeInfoPropertyName = "EvaluationCriterionVerdictStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterionVerdict))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdict))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationVerdict))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishGateResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowVersion))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphNodesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphEdgesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphVariablesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraph))] + [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetFlowResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PutFlowRequestNodesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PutFlowRequestEdgesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PutFlowRequestVariablesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PutFlowRequest))] + [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowValidationIssue))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowValidationError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishFlowRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RollbackFlowRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListFlowVersionsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowTemplate))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListFlowTemplatesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphInputNodesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphInputEdgesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphInputVariablesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FlowGraphInput))] + [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateFlowTemplateRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CloneFlowTemplateRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.PublishGateResultDecision?), TypeInfoPropertyName = "NullablePublishGateResultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictOutcome?), TypeInfoPropertyName = "NullableEvaluationCaseVerdictOutcome2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCaseVerdictFault?), TypeInfoPropertyName = "NullableEvaluationCaseVerdictFault2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EvaluationCriterionVerdictStatus?), TypeInfoPropertyName = "NullableEvaluationCriterionVerdictStatus2")] + [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))] + internal sealed partial class FlowSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class FlowSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static FlowSourceGenerationContext Default { get; } = new(DefaultOptions); + + private FlowSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.PublishGateResultDecision) + + || typeToConvert == typeof(global::Speechify.PublishGateResultDecision?) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome?) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault) + + || typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault?) + + || typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus) + + || typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PublishGateResultDecision)) + { + return new global::Speechify.JsonConverters.PublishGateResultDecisionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PublishGateResultDecision?)) + { + return new global::Speechify.JsonConverters.PublishGateResultDecisionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictOutcomeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictOutcome?)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictOutcomeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictFaultJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCaseVerdictFault?)) + { + return new global::Speechify.JsonConverters.EvaluationCaseVerdictFaultNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus)) + { + return new global::Speechify.JsonConverters.EvaluationCriterionVerdictStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.EvaluationCriterionVerdictStatus?)) + { + return new global::Speechify.JsonConverters.EvaluationCriterionVerdictStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new FlowSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.FlowClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.FlowClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..5cb93d1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.FlowClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class FlowClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.FlowClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.FlowClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..599dd4b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.FlowClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class FlowClient + { + /// + + public FlowClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.FlowClient.g.cs b/src/libs/Speechify/Generated/Speechify.FlowClient.g.cs index 7336f21..d00ea0b 100644 --- a/src/libs/Speechify/Generated/Speechify.FlowClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FlowClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class FlowClient : global::Speechify.IFlowClient, global:: /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.FlowSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs new file mode 100644 index 0000000..7645717 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs @@ -0,0 +1,229 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiAuthMode), TypeInfoPropertyName = "HostedApiAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPI))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListHostedAPIsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRequestAuthMode), TypeInfoPropertyName = "CreateHostedApiRequestAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedAPIRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRequestAuthMode), TypeInfoPropertyName = "UpdateHostedApiRequestAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedAPIRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiUsageRoutesItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUsage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUserTokenSecret))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.HostedApiAuthMode?), TypeInfoPropertyName = "NullableHostedApiAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRequestAuthMode?), TypeInfoPropertyName = "NullableCreateHostedApiRequestAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRequestAuthMode?), TypeInfoPropertyName = "NullableUpdateHostedApiRequestAuthMode2")] + [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))] + internal sealed partial class HostedApisSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class HostedApisSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static HostedApisSourceGenerationContext Default { get; } = new(DefaultOptions); + + private HostedApisSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.HostedApiAuthMode) + + || typeToConvert == typeof(global::Speechify.HostedApiAuthMode?) + + || typeToConvert == typeof(global::Speechify.CreateHostedApiRequestAuthMode) + + || typeToConvert == typeof(global::Speechify.CreateHostedApiRequestAuthMode?) + + || typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode) + + || typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiAuthMode)) + { + return new global::Speechify.JsonConverters.HostedApiAuthModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiAuthMode?)) + { + return new global::Speechify.JsonConverters.HostedApiAuthModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateHostedApiRequestAuthMode)) + { + return new global::Speechify.JsonConverters.CreateHostedApiRequestAuthModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateHostedApiRequestAuthMode?)) + { + return new global::Speechify.JsonConverters.CreateHostedApiRequestAuthModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode)) + { + return new global::Speechify.JsonConverters.UpdateHostedApiRequestAuthModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode?)) + { + return new global::Speechify.JsonConverters.UpdateHostedApiRequestAuthModeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new HostedApisSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..5769d10 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class HostedApisClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..6f07b4b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class HostedApisClient + { + /// + + public HostedApisClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.HostedApisClient.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.g.cs index 57d85e7..a23836d 100644 --- a/src/libs/Speechify/Generated/Speechify.HostedApisClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class HostedApisClient : global::Speechify.IHostedApisClie /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.HostedApisSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IAdminClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IAdminClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..219960b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IAdminClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IAdminClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IAgentClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IAgentClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..5b412d2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IAgentClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IAgentClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IAgentsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IAgentsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..fd0c798 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IAgentsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IAgentsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IAudioAssetsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IAudioAssetsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..fa333a0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IAudioAssetsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IAudioAssetsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IAudioClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IAudioClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..2410cfb --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IAudioClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IAudioClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IBatchCallsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IBatchCallsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..ac3bcf8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IBatchCallsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IBatchCallsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ICallersClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ICallersClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..837e8ab --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICallersClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ICallersClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IConsentChallengesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IConsentChallengesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..b4a80fd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IConsentChallengesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IConsentChallengesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IContactsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IContactsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..5bba455 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IContactsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IContactsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IConversationsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IConversationsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..dc80662 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IConversationsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IConversationsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs index d74c023..f20dae4 100644 --- a/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs @@ -30,7 +30,9 @@ public partial interface IConversationsClient /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -40,8 +42,8 @@ public partial interface IConversationsClient /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// @@ -101,7 +103,9 @@ public partial interface IConversationsClient /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -111,8 +115,8 @@ public partial interface IConversationsClient /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs b/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs index 30264f3..887fa08 100644 --- a/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs @@ -20,7 +20,9 @@ public partial interface IConversationsClient /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -30,8 +32,8 @@ public partial interface IConversationsClient /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// @@ -79,7 +81,9 @@ public partial interface IConversationsClient /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -89,8 +93,8 @@ public partial interface IConversationsClient /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..f4310b7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IDocumentsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IEndpointsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IEndpointsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..41dd520 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IEndpointsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IEndpointsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IFilesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..eebc94b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IFilesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IFlowClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IFlowClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..caa8d4b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IFlowClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IFlowClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..0a03119 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IHostedApisClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IIvrMemoryClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IIvrMemoryClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..420c416 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IIvrMemoryClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IIvrMemoryClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IKeysClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IKeysClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..52ac201 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IKeysClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IKeysClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IKnowledgeBasesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IKnowledgeBasesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..3c116a0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IKnowledgeBasesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IKnowledgeBasesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IMemoriesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IMemoriesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..ed86514 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IMemoriesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IMemoriesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IModelsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IModelsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..f9804b2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IModelsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IModelsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IOutboundCallsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IOutboundCallsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..33cbce6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IOutboundCallsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IOutboundCallsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IPhoneNumbersClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IPhoneNumbersClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..af581bf --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IPhoneNumbersClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IPhoneNumbersClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IProjectsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IProjectsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..da29636 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IProjectsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IProjectsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IPublishGateClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IPublishGateClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..297f9fa --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IPublishGateClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IPublishGateClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..d08a51d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IRoutesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IRunsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IRunsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..2cebcf7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IRunsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IRunsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..96bbbac --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IShareLinksClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISipTrunksClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ISipTrunksClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..5dc8bd1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ISipTrunksClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ISipTrunksClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ISkillsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ISkillsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..66a28c7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ISkillsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ISkillsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IStoresClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IStoresClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..4f41f7f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IStoresClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IStoresClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ITeamsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ITeamsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..f3aec89 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ITeamsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ITeamsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ITestsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ITestsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..d1c6689 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ITestsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ITestsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..f8bf32e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IToolDefinitionsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ITriggersClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ITriggersClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..754b4f2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ITriggersClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ITriggersClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IVoicesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IVoicesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..4960701 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IVoicesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IVoicesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IWatermarkClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IWatermarkClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..96124dd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IWatermarkClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IWatermarkClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IWorkspacesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IWorkspacesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..0cfeadc --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IWorkspacesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface IWorkspacesClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IvrMemory.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.IvrMemory.JsonSerializerContext.g.cs new file mode 100644 index 0000000..a5832a3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IvrMemory.JsonSerializerContext.g.cs @@ -0,0 +1,175 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.IvrMenuListEntryMenuTree))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.IVRMenuListEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListIVRMenusResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.IvrMenuMenuTree))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.IVRMenu))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateIVRMenuLabelRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.InvalidateIVRMenuRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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::System.Collections.Generic.List))] + internal sealed partial class IvrMemorySourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class IvrMemorySourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static IvrMemorySourceGenerationContext Default { get; } = new(DefaultOptions); + + private IvrMemorySourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new IvrMemorySourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..b70c6d7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class IvrMemoryClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..70fb198 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class IvrMemoryClient + { + /// + + public IvrMemoryClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.IvrMemoryClient.g.cs b/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.g.cs index b8fdf82..60a6c6e 100644 --- a/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IvrMemoryClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class IvrMemoryClient : global::Speechify.IIvrMemoryClient /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.IvrMemorySourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Keys.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Keys.JsonSerializerContext.g.cs new file mode 100644 index 0000000..a7955fc --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Keys.JsonSerializerContext.g.cs @@ -0,0 +1,171 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.HostedAPIKey))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListHostedAPIKeysResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedAPIKeyRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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::System.Collections.Generic.List))] + internal sealed partial class KeysSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class KeysSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static KeysSourceGenerationContext Default { get; } = new(DefaultOptions); + + private KeysSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new KeysSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.KeysClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.KeysClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..88e8004 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.KeysClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class KeysClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.KeysClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.KeysClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..90f7543 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.KeysClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class KeysClient + { + /// + + public KeysClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.KeysClient.g.cs b/src/libs/Speechify/Generated/Speechify.KeysClient.g.cs index 77f468a..e479848 100644 --- a/src/libs/Speechify/Generated/Speechify.KeysClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.KeysClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class KeysClient : global::Speechify.IKeysClient, global:: /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.KeysSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.KnowledgeBases.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.KnowledgeBases.JsonSerializerContext.g.cs new file mode 100644 index 0000000..859817e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.KnowledgeBases.JsonSerializerContext.g.cs @@ -0,0 +1,398 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SearchHitRanking))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RetrievalCoverage), TypeInfoPropertyName = "RetrievalCoverage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus), TypeInfoPropertyName = "JobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseInjection))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBasesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateKnowledgeBaseRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SearchKnowledgeBasesRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseSearchHit))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SearchKnowledgeBasesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateKnowledgeBaseRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseCoverageHealth))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseCoverageGap))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentSourceKind), TypeInfoPropertyName = "KnowledgeBaseDocumentSourceKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseCoverageDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseCoverage))] + [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.KnowledgeBaseEvalCase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBaseEvalCasesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateKnowledgeBaseEvalCaseRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateKnowledgeBaseEvalCaseRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseEvaluationResults))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseEvaluationMetrics))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseEvaluation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBaseEvaluationsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StartKnowledgeBaseEvaluationRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseEvaluationHit))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseEvaluationResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBaseEvaluationResultsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentInjectionMode), TypeInfoPropertyName = "KnowledgeBaseDocumentInjectionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentStatus), TypeInfoPropertyName = "KnowledgeBaseDocumentStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBaseDocumentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentDetailInjectionMode), TypeInfoPropertyName = "KnowledgeBaseDocumentDetailInjectionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DependentAgent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RefreshConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode), TypeInfoPropertyName = "V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseChunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBaseChunksResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateCrawlImportRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportJobKind), TypeInfoPropertyName = "ImportJobKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportJob))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateSitemapImportRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateTextDocumentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateURLDocumentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateURLBatchImportRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchDeleteDocumentsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchMoveDocumentsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchMoveDocumentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateRefreshConfigRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RefreshHistoryEntryStatus), TypeInfoPropertyName = "RefreshHistoryEntryStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RefreshHistoryEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListRefreshHistoryResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseFolder))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListKnowledgeBaseFoldersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateFolderRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateFolderRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListImportJobsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadDocumentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateDocumentRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.RetrievalCoverage?), TypeInfoPropertyName = "NullableRetrievalCoverage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus?), TypeInfoPropertyName = "NullableJobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentSourceKind?), TypeInfoPropertyName = "NullableKnowledgeBaseDocumentSourceKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentInjectionMode?), TypeInfoPropertyName = "NullableKnowledgeBaseDocumentInjectionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentStatus?), TypeInfoPropertyName = "NullableKnowledgeBaseDocumentStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.KnowledgeBaseDocumentDetailInjectionMode?), TypeInfoPropertyName = "NullableKnowledgeBaseDocumentDetailInjectionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode?), TypeInfoPropertyName = "NullableV1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportJobKind?), TypeInfoPropertyName = "NullableImportJobKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RefreshHistoryEntryStatus?), TypeInfoPropertyName = "NullableRefreshHistoryEntryStatus2")] + [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))] + internal sealed partial class KnowledgeBasesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class KnowledgeBasesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static KnowledgeBasesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private KnowledgeBasesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.RetrievalCoverage) + + || typeToConvert == typeof(global::Speechify.RetrievalCoverage?) + + || typeToConvert == typeof(global::Speechify.JobStatus) + + || typeToConvert == typeof(global::Speechify.JobStatus?) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentSourceKind) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentSourceKind?) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentInjectionMode) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentInjectionMode?) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentStatus) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentStatus?) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentDetailInjectionMode) + + || typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentDetailInjectionMode?) + + || typeToConvert == typeof(global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode) + + || typeToConvert == typeof(global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode?) + + || typeToConvert == typeof(global::Speechify.ImportJobKind) + + || typeToConvert == typeof(global::Speechify.ImportJobKind?) + + || typeToConvert == typeof(global::Speechify.RefreshHistoryEntryStatus) + + || typeToConvert == typeof(global::Speechify.RefreshHistoryEntryStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RetrievalCoverage)) + { + return new global::Speechify.JsonConverters.RetrievalCoverageJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RetrievalCoverage?)) + { + return new global::Speechify.JsonConverters.RetrievalCoverageNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus)) + { + return new global::Speechify.JsonConverters.JobStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus?)) + { + return new global::Speechify.JsonConverters.JobStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentSourceKind)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentSourceKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentSourceKind?)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentSourceKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentInjectionMode)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentInjectionModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentInjectionMode?)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentInjectionModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentStatus)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentStatus?)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentDetailInjectionMode)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentDetailInjectionModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.KnowledgeBaseDocumentDetailInjectionMode?)) + { + return new global::Speechify.JsonConverters.KnowledgeBaseDocumentDetailInjectionModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode)) + { + return new global::Speechify.JsonConverters.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode?)) + { + return new global::Speechify.JsonConverters.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ImportJobKind)) + { + return new global::Speechify.JsonConverters.ImportJobKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ImportJobKind?)) + { + return new global::Speechify.JsonConverters.ImportJobKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RefreshHistoryEntryStatus)) + { + return new global::Speechify.JsonConverters.RefreshHistoryEntryStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RefreshHistoryEntryStatus?)) + { + return new global::Speechify.JsonConverters.RefreshHistoryEntryStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new KnowledgeBasesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..f8da7b9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class KnowledgeBasesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..0e2537f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class KnowledgeBasesClient + { + /// + + public KnowledgeBasesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.KnowledgeBasesClient.g.cs b/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.g.cs index 2698c6f..6a5b09b 100644 --- a/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.KnowledgeBasesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class KnowledgeBasesClient : global::Speechify.IKnowledgeB /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.KnowledgeBasesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Memories.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Memories.JsonSerializerContext.g.cs new file mode 100644 index 0000000..ba6f1f3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Memories.JsonSerializerContext.g.cs @@ -0,0 +1,160 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + internal sealed partial class MemoriesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class MemoriesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static MemoriesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private MemoriesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new MemoriesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.MemoriesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.MemoriesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..5fa8922 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.MemoriesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class MemoriesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.MemoriesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.MemoriesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..15cdc6d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.MemoriesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class MemoriesClient + { + /// + + public MemoriesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.MemoriesClient.g.cs b/src/libs/Speechify/Generated/Speechify.MemoriesClient.g.cs index 24cc56d..81500ad 100644 --- a/src/libs/Speechify/Generated/Speechify.MemoriesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.MemoriesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class MemoriesClient : global::Speechify.IMemoriesClient, /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.MemoriesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs b/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs index 7ba27a5..337829c 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs @@ -201,6 +201,15 @@ public sealed partial class BillingEntitlements [global::System.Text.Json.Serialization.JsonRequired] public required bool SlackChannelAccess { get; set; } + /// + /// Whether the workspace may connect a WhatsApp front door, on a
+ /// Telnyx number or on its own Meta app. Off on every plan; granted
+ /// per workspace, and like Slack only alongside `text_agent_access`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("whatsapp_channel_access")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool WhatsappChannelAccess { get; set; } + /// /// Whether stores and hosted APIs are available. Off on every plan; granted per workspace. /// @@ -267,6 +276,13 @@ public sealed partial class BillingEntitlements [global::System.Text.Json.Serialization.JsonRequired] public required bool PhoneSms { get; set; } + /// + /// Whether WhatsApp on Agent Phone numbers is available (requires the number's WhatsApp Business registration). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("phone_whatsapp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool PhoneWhatsapp { get; set; } + /// /// Whether zero data retention is enabled for this workspace on the
/// Text to Speech API. Read-only: Speechify sets it against a signed
@@ -413,6 +429,11 @@ public sealed partial class BillingEntitlements /// runtime and meters as a text message, so `text_agent_access` is
/// required alongside it. /// + /// + /// Whether the workspace may connect a WhatsApp front door, on a
+ /// Telnyx number or on its own Meta app. Off on every plan; granted
+ /// per workspace, and like Slack only alongside `text_agent_access`. + /// /// /// Whether stores and hosted APIs are available. Off on every plan; granted per workspace. /// @@ -443,6 +464,9 @@ public sealed partial class BillingEntitlements /// /// Whether SMS on Agent Phone numbers is available (also requires 10DLC). /// + /// + /// Whether WhatsApp on Agent Phone numbers is available (requires the number's WhatsApp Business registration). + /// /// /// Whether zero data retention is enabled for this workspace on the
/// Text to Speech API. Read-only: Speechify sets it against a signed
@@ -493,6 +517,7 @@ public BillingEntitlements( bool durableRunsAccess, int maxRunTurns, bool slackChannelAccess, + bool whatsappChannelAccess, bool hostedApisAccess, int maxStoreDocuments, long maxStoreBytes, @@ -502,6 +527,7 @@ public BillingEntitlements( bool enterpriseSso, bool phoneRelay, bool phoneSms, + bool phoneWhatsapp, bool zeroDataRetention, bool voiceCloningConsentExempt, int maxManualTopUpUsd, @@ -530,6 +556,7 @@ public BillingEntitlements( this.DurableRunsAccess = durableRunsAccess; this.MaxRunTurns = maxRunTurns; this.SlackChannelAccess = slackChannelAccess; + this.WhatsappChannelAccess = whatsappChannelAccess; this.HostedApisAccess = hostedApisAccess; this.MaxStoreDocuments = maxStoreDocuments; this.MaxStoreBytes = maxStoreBytes; @@ -539,6 +566,7 @@ public BillingEntitlements( this.EnterpriseSso = enterpriseSso; this.PhoneRelay = phoneRelay; this.PhoneSms = phoneSms; + this.PhoneWhatsapp = phoneWhatsapp; this.ZeroDataRetention = zeroDataRetention; this.VoiceCloningConsentExempt = voiceCloningConsentExempt; this.MaxManualTopUpUsd = maxManualTopUpUsd; diff --git a/src/libs/Speechify/Generated/Speechify.Models.Conversation.g.cs b/src/libs/Speechify/Generated/Speechify.Models.Conversation.g.cs index 781a1d9..6ff9580 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.Conversation.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.Conversation.g.cs @@ -43,7 +43,9 @@ public sealed partial class Conversation /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. ///
@@ -58,8 +60,8 @@ public sealed partial class Conversation /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. ///
[global::System.Text.Json.Serialization.JsonPropertyName("channel")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ConversationChannelJsonConverter))] @@ -301,7 +303,9 @@ public sealed partial class Conversation /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. /// @@ -311,8 +315,8 @@ public sealed partial class Conversation /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// /// /// When the conversation row was created (the call was
diff --git a/src/libs/Speechify/Generated/Speechify.Models.ConversationChannel.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ConversationChannel.g.cs index d0f487f..b3aec28 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ConversationChannel.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ConversationChannel.g.cs @@ -9,8 +9,8 @@ namespace Speechify /// conversation's channel by. Both telephony directions are
/// `voice`; the browser / SDK realtime path is `web`; the message
/// API is `text`; a conversation reached over a provider front
- /// door names that provider (`slack`) rather than the transport it
- /// shares with the message API. + /// door names that provider (`slack`, `whatsapp`) rather than the
+ /// transport it shares with the message API. /// public enum ConversationChannel { @@ -30,6 +30,10 @@ public enum ConversationChannel /// /// Web, + /// + /// + /// + Whatsapp, } /// @@ -48,6 +52,7 @@ public static string ToValueString(this ConversationChannel value) ConversationChannel.Text => "text", ConversationChannel.Voice => "voice", ConversationChannel.Web => "web", + ConversationChannel.Whatsapp => "whatsapp", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -62,6 +67,7 @@ public static string ToValueString(this ConversationChannel value) "text" => ConversationChannel.Text, "voice" => ConversationChannel.Voice, "web" => ConversationChannel.Web, + "whatsapp" => ConversationChannel.Whatsapp, _ => null, }; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.ConversationTransport.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ConversationTransport.g.cs index aeffc66..6c16e0f 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ConversationTransport.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ConversationTransport.g.cs @@ -12,7 +12,9 @@ namespace Speechify /// A conversation reports the transport it actually ran on:
/// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
/// selectable when filtering a list and matches calls in either
- /// direction; `whatsapp` is reserved and matches nothing today.
+ /// direction; `whatsapp` is reserved and matches nothing, because a
+ /// WhatsApp conversation runs on the `text` transport and is told
+ /// apart by `channel: whatsapp`.
/// To tell two conversations on the same transport apart, filter
/// or read `channel` instead. ///
@@ -39,7 +41,7 @@ public enum ConversationTransport /// Web, /// - /// + /// whatsapp`. /// Whatsapp, } diff --git a/src/libs/Speechify/Generated/Speechify.Models.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Models.JsonSerializerContext.g.cs new file mode 100644 index 0000000..f652f4a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.JsonSerializerContext.g.cs @@ -0,0 +1,170 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Model))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ModelsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ModelsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ModelsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ModelsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ModelsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ModelsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ModelsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ModelsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..4bd5462 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ModelsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ModelsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ModelsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ModelsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..a9160d7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ModelsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ModelsClient + { + /// + + public ModelsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ModelsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ModelsClient.g.cs index f237801..87b02b9 100644 --- a/src/libs/Speechify/Generated/Speechify.ModelsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ModelsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ModelsClient : global::Speechify.IModelsClient, glob /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ModelsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.OutboundCalls.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.OutboundCalls.JsonSerializerContext.g.cs new file mode 100644 index 0000000..2400ce7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.OutboundCalls.JsonSerializerContext.g.cs @@ -0,0 +1,221 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction), TypeInfoPropertyName = "AmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction), TypeInfoPropertyName = "AmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvr))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction), TypeInfoPropertyName = "AmdConfigOnUnavailableAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailable))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigTuning))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AMDConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateOutboundCallRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateOutboundCallResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnVoicemailAction?), TypeInfoPropertyName = "NullableAmdConfigOnVoicemailAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnIvrAction?), TypeInfoPropertyName = "NullableAmdConfigOnIvrAction2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AmdConfigOnUnavailableAction?), TypeInfoPropertyName = "NullableAmdConfigOnUnavailableAction2")] + internal sealed partial class OutboundCallsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class OutboundCallsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static OutboundCallsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private OutboundCallsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction) + + || typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnVoicemailAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnVoicemailActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnIvrAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnIvrActionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AmdConfigOnUnavailableAction?)) + { + return new global::Speechify.JsonConverters.AmdConfigOnUnavailableActionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new OutboundCallsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..998691d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class OutboundCallsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..60e2ec7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class OutboundCallsClient + { + /// + + public OutboundCallsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.OutboundCallsClient.g.cs b/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.g.cs index f05df4c..06d7197 100644 --- a/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.OutboundCallsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class OutboundCallsClient : global::Speechify.IOutboundCal /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.OutboundCallsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.PhoneNumbers.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.PhoneNumbers.JsonSerializerContext.g.cs new file mode 100644 index 0000000..9dba6b7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.PhoneNumbers.JsonSerializerContext.g.cs @@ -0,0 +1,265 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberProvider), TypeInfoPropertyName = "PhoneNumberProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberCapability), TypeInfoPropertyName = "PhoneNumberCapability2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberReputationRisk), TypeInfoPropertyName = "PhoneNumberReputationRisk2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberReputation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumber))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListPhoneNumbersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TwilioImportSpec))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TelnyxImportSpec))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportPhoneNumberRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PurchasedPhoneNumberProvider), TypeInfoPropertyName = "PurchasedPhoneNumberProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AvailablePhoneNumber))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SearchAvailablePhoneNumbersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.IntendedUseMarketingOrInformational), TypeInfoPropertyName = "IntendedUseMarketingOrInformational2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.IntendedUse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PurchasePhoneNumberRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdatePhoneNumberRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.PhoneNumberProvider?), TypeInfoPropertyName = "NullablePhoneNumberProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberCapability?), TypeInfoPropertyName = "NullablePhoneNumberCapability2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberReputationRisk?), TypeInfoPropertyName = "NullablePhoneNumberReputationRisk2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PurchasedPhoneNumberProvider?), TypeInfoPropertyName = "NullablePurchasedPhoneNumberProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.IntendedUseMarketingOrInformational?), TypeInfoPropertyName = "NullableIntendedUseMarketingOrInformational2")] + [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))] + internal sealed partial class PhoneNumbersSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class PhoneNumbersSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static PhoneNumbersSourceGenerationContext Default { get; } = new(DefaultOptions); + + private PhoneNumbersSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.PhoneNumberProvider) + + || typeToConvert == typeof(global::Speechify.PhoneNumberProvider?) + + || typeToConvert == typeof(global::Speechify.PhoneNumberCapability) + + || typeToConvert == typeof(global::Speechify.PhoneNumberCapability?) + + || typeToConvert == typeof(global::Speechify.PhoneNumberReputationRisk) + + || typeToConvert == typeof(global::Speechify.PhoneNumberReputationRisk?) + + || typeToConvert == typeof(global::Speechify.PurchasedPhoneNumberProvider) + + || typeToConvert == typeof(global::Speechify.PurchasedPhoneNumberProvider?) + + || typeToConvert == typeof(global::Speechify.IntendedUseMarketingOrInformational) + + || typeToConvert == typeof(global::Speechify.IntendedUseMarketingOrInformational?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PhoneNumberProvider)) + { + return new global::Speechify.JsonConverters.PhoneNumberProviderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PhoneNumberProvider?)) + { + return new global::Speechify.JsonConverters.PhoneNumberProviderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PhoneNumberCapability)) + { + return new global::Speechify.JsonConverters.PhoneNumberCapabilityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PhoneNumberCapability?)) + { + return new global::Speechify.JsonConverters.PhoneNumberCapabilityNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PhoneNumberReputationRisk)) + { + return new global::Speechify.JsonConverters.PhoneNumberReputationRiskJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PhoneNumberReputationRisk?)) + { + return new global::Speechify.JsonConverters.PhoneNumberReputationRiskNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PurchasedPhoneNumberProvider)) + { + return new global::Speechify.JsonConverters.PurchasedPhoneNumberProviderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PurchasedPhoneNumberProvider?)) + { + return new global::Speechify.JsonConverters.PurchasedPhoneNumberProviderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.IntendedUseMarketingOrInformational)) + { + return new global::Speechify.JsonConverters.IntendedUseMarketingOrInformationalJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.IntendedUseMarketingOrInformational?)) + { + return new global::Speechify.JsonConverters.IntendedUseMarketingOrInformationalNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new PhoneNumbersSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..8a84126 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class PhoneNumbersClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..3977730 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class PhoneNumbersClient + { + /// + + public PhoneNumbersClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.PhoneNumbersClient.g.cs b/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.g.cs index 3fcdb43..3092443 100644 --- a/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.PhoneNumbersClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class PhoneNumbersClient : global::Speechify.IPhoneNumbers /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.PhoneNumbersSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Projects.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Projects.JsonSerializerContext.g.cs new file mode 100644 index 0000000..8741821 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Projects.JsonSerializerContext.g.cs @@ -0,0 +1,303 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Project))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListProjectsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateProjectRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateProjectRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DeleteProjectRequestMode), TypeInfoPropertyName = "DeleteProjectRequestMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DeleteProjectRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRestoredCounts))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectStillRevokedCounts))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRestore))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardownBlockerKind), TypeInfoPropertyName = "ProjectTeardownBlockerKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardownBlockerBlocksItems), TypeInfoPropertyName = "ProjectTeardownBlockerBlocksItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardownBlocker))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardownGroup))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardown))] + [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.ProjectResourceCounts))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectStats))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteProjectRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteCreated))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteReused))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteAttentionKind), TypeInfoPropertyName = "PromoteAttentionKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteAttentionReason), TypeInfoPropertyName = "PromoteAttentionReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteAttention))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteProjectResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectAuditEventType), TypeInfoPropertyName = "ProjectAuditEventType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectAuditEvent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectAuditResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectMember))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectMembersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GrantProjectMemberRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.DeleteProjectRequestMode?), TypeInfoPropertyName = "NullableDeleteProjectRequestMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardownBlockerKind?), TypeInfoPropertyName = "NullableProjectTeardownBlockerKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectTeardownBlockerBlocksItems?), TypeInfoPropertyName = "NullableProjectTeardownBlockerBlocksItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteAttentionKind?), TypeInfoPropertyName = "NullablePromoteAttentionKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PromoteAttentionReason?), TypeInfoPropertyName = "NullablePromoteAttentionReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectAuditEventType?), TypeInfoPropertyName = "NullableProjectAuditEventType2")] + [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))] + internal sealed partial class ProjectsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ProjectsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ProjectsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ProjectsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.DeleteProjectRequestMode) + + || typeToConvert == typeof(global::Speechify.DeleteProjectRequestMode?) + + || typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerKind) + + || typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerKind?) + + || typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerBlocksItems) + + || typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerBlocksItems?) + + || typeToConvert == typeof(global::Speechify.PromoteAttentionKind) + + || typeToConvert == typeof(global::Speechify.PromoteAttentionKind?) + + || typeToConvert == typeof(global::Speechify.PromoteAttentionReason) + + || typeToConvert == typeof(global::Speechify.PromoteAttentionReason?) + + || typeToConvert == typeof(global::Speechify.ProjectAuditEventType) + + || typeToConvert == typeof(global::Speechify.ProjectAuditEventType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DeleteProjectRequestMode)) + { + return new global::Speechify.JsonConverters.DeleteProjectRequestModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DeleteProjectRequestMode?)) + { + return new global::Speechify.JsonConverters.DeleteProjectRequestModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerKind)) + { + return new global::Speechify.JsonConverters.ProjectTeardownBlockerKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerKind?)) + { + return new global::Speechify.JsonConverters.ProjectTeardownBlockerKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerBlocksItems)) + { + return new global::Speechify.JsonConverters.ProjectTeardownBlockerBlocksItemsJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectTeardownBlockerBlocksItems?)) + { + return new global::Speechify.JsonConverters.ProjectTeardownBlockerBlocksItemsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PromoteAttentionKind)) + { + return new global::Speechify.JsonConverters.PromoteAttentionKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PromoteAttentionKind?)) + { + return new global::Speechify.JsonConverters.PromoteAttentionKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PromoteAttentionReason)) + { + return new global::Speechify.JsonConverters.PromoteAttentionReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PromoteAttentionReason?)) + { + return new global::Speechify.JsonConverters.PromoteAttentionReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectAuditEventType)) + { + return new global::Speechify.JsonConverters.ProjectAuditEventTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectAuditEventType?)) + { + return new global::Speechify.JsonConverters.ProjectAuditEventTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ProjectsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ProjectsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ProjectsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..e1e0ca7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ProjectsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ProjectsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ProjectsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ProjectsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..8067500 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ProjectsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ProjectsClient + { + /// + + public ProjectsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ProjectsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ProjectsClient.g.cs index ff6e6ba..0a5e1fc 100644 --- a/src/libs/Speechify/Generated/Speechify.ProjectsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ProjectsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ProjectsClient : global::Speechify.IProjectsClient, /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ProjectsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.PublishGate.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.PublishGate.JsonSerializerContext.g.cs new file mode 100644 index 0000000..35cb0be --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.PublishGate.JsonSerializerContext.g.cs @@ -0,0 +1,184 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.PublishGateRunDecision), TypeInfoPropertyName = "PublishGateRunDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PublishGateRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LatestPublishGateRunResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.PublishGateRunDecision?), TypeInfoPropertyName = "NullablePublishGateRunDecision2")] + internal sealed partial class PublishGateSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class PublishGateSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static PublishGateSourceGenerationContext Default { get; } = new(DefaultOptions); + + private PublishGateSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.PublishGateRunDecision) + + || typeToConvert == typeof(global::Speechify.PublishGateRunDecision?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PublishGateRunDecision)) + { + return new global::Speechify.JsonConverters.PublishGateRunDecisionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PublishGateRunDecision?)) + { + return new global::Speechify.JsonConverters.PublishGateRunDecisionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new PublishGateSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.PublishGateClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.PublishGateClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..eb7451e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.PublishGateClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class PublishGateClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.PublishGateClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.PublishGateClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..8dcdeb1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.PublishGateClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class PublishGateClient + { + /// + + public PublishGateClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.PublishGateClient.g.cs b/src/libs/Speechify/Generated/Speechify.PublishGateClient.g.cs index 417758e..9b310ac 100644 --- a/src/libs/Speechify/Generated/Speechify.PublishGateClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.PublishGateClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class PublishGateClient : global::Speechify.IPublishGateCl /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.PublishGateSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Routes.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Routes.JsonSerializerContext.g.cs new file mode 100644 index 0000000..236ace8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Routes.JsonSerializerContext.g.cs @@ -0,0 +1,308 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.StoreAggregateMetricOp), TypeInfoPropertyName = "StoreAggregateMetricOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateMetric))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiRouteMethod), TypeInfoPropertyName = "HostedApiRouteMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverType), TypeInfoPropertyName = "HostedApiResolverType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWriteMode), TypeInfoPropertyName = "HostedApiResolverWriteMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWhereItemsOp), TypeInfoPropertyName = "HostedApiResolverWhereItemsOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWhereItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverOrderByDirection), TypeInfoPropertyName = "HostedApiResolverOrderByDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverOrderBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIResolver))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIRoute))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListHostedAPIRoutesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRouteRequestMethod), TypeInfoPropertyName = "CreateHostedApiRouteRequestMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedAPIRouteRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRouteRequestMethod), TypeInfoPropertyName = "UpdateHostedApiRouteRequestMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedAPIRouteRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.StoreAggregateMetricOp?), TypeInfoPropertyName = "NullableStoreAggregateMetricOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiRouteMethod?), TypeInfoPropertyName = "NullableHostedApiRouteMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverType?), TypeInfoPropertyName = "NullableHostedApiResolverType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWriteMode?), TypeInfoPropertyName = "NullableHostedApiResolverWriteMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWhereItemsOp?), TypeInfoPropertyName = "NullableHostedApiResolverWhereItemsOp2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverOrderByDirection?), TypeInfoPropertyName = "NullableHostedApiResolverOrderByDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRouteRequestMethod?), TypeInfoPropertyName = "NullableCreateHostedApiRouteRequestMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRouteRequestMethod?), TypeInfoPropertyName = "NullableUpdateHostedApiRouteRequestMethod2")] + [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))] + internal sealed partial class RoutesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class RoutesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static RoutesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private RoutesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp) + + || typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp?) + + || typeToConvert == typeof(global::Speechify.HostedApiRouteMethod) + + || typeToConvert == typeof(global::Speechify.HostedApiRouteMethod?) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverType) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverType?) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverWriteMode) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverWriteMode?) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverWhereItemsOp) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverWhereItemsOp?) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverOrderByDirection) + + || typeToConvert == typeof(global::Speechify.HostedApiResolverOrderByDirection?) + + || typeToConvert == typeof(global::Speechify.CreateHostedApiRouteRequestMethod) + + || typeToConvert == typeof(global::Speechify.CreateHostedApiRouteRequestMethod?) + + || typeToConvert == typeof(global::Speechify.UpdateHostedApiRouteRequestMethod) + + || typeToConvert == typeof(global::Speechify.UpdateHostedApiRouteRequestMethod?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp)) + { + return new global::Speechify.JsonConverters.StoreAggregateMetricOpJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp?)) + { + return new global::Speechify.JsonConverters.StoreAggregateMetricOpNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiRouteMethod)) + { + return new global::Speechify.JsonConverters.HostedApiRouteMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiRouteMethod?)) + { + return new global::Speechify.JsonConverters.HostedApiRouteMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverType)) + { + return new global::Speechify.JsonConverters.HostedApiResolverTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverType?)) + { + return new global::Speechify.JsonConverters.HostedApiResolverTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverWriteMode)) + { + return new global::Speechify.JsonConverters.HostedApiResolverWriteModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverWriteMode?)) + { + return new global::Speechify.JsonConverters.HostedApiResolverWriteModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverWhereItemsOp)) + { + return new global::Speechify.JsonConverters.HostedApiResolverWhereItemsOpJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverWhereItemsOp?)) + { + return new global::Speechify.JsonConverters.HostedApiResolverWhereItemsOpNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverOrderByDirection)) + { + return new global::Speechify.JsonConverters.HostedApiResolverOrderByDirectionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.HostedApiResolverOrderByDirection?)) + { + return new global::Speechify.JsonConverters.HostedApiResolverOrderByDirectionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateHostedApiRouteRequestMethod)) + { + return new global::Speechify.JsonConverters.CreateHostedApiRouteRequestMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateHostedApiRouteRequestMethod?)) + { + return new global::Speechify.JsonConverters.CreateHostedApiRouteRequestMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.UpdateHostedApiRouteRequestMethod)) + { + return new global::Speechify.JsonConverters.UpdateHostedApiRouteRequestMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.UpdateHostedApiRouteRequestMethod?)) + { + return new global::Speechify.JsonConverters.UpdateHostedApiRouteRequestMethodNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new RoutesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.RoutesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..9f4b9ee --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class RoutesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.RoutesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..e2178a4 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class RoutesClient + { + /// + + public RoutesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.RoutesClient.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.g.cs index 895bbec..ab94c62 100644 --- a/src/libs/Speechify/Generated/Speechify.RoutesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class RoutesClient : global::Speechify.IRoutesClient, glob /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.RoutesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs new file mode 100644 index 0000000..5672628 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs @@ -0,0 +1,446 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentRunRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStatus), TypeInfoPropertyName = "AgentRunStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunInputDelegationTargetsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunOutputTranscriptItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunIncompleteReason), TypeInfoPropertyName = "AgentRunIncompleteReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunUsageModelsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunUsageToolsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunUsage))] + [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.PendingActionDefaultDecision), TypeInfoPropertyName = "PendingActionDefaultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PendingAction))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus), TypeInfoPropertyName = "V1AgentsAgentIdRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentRunsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsRunsGetParametersStatus), TypeInfoPropertyName = "V1AgentsRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequestDecision), TypeInfoPropertyName = "SubmitAgentRunRequestDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepKind), TypeInfoPropertyName = "AgentRunStepKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunStepDelegationChildStatus), TypeInfoPropertyName = "RunStepDelegationChildStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunStepDelegation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStep))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentRunStepsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepAddedEventKind), TypeInfoPropertyName = "AgentRunStepAddedEventKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStatusChangedEventStatus), TypeInfoPropertyName = "AgentRunStatusChangedEventStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunEndedEventStatus), TypeInfoPropertyName = "AgentRunEndedEventStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunEndedEventOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEvent), TypeInfoPropertyName = "AgentRunStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant1Type), TypeInfoPropertyName = "AgentRunStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant2Type), TypeInfoPropertyName = "AgentRunStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant3Type), TypeInfoPropertyName = "AgentRunStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventDiscriminatorType), TypeInfoPropertyName = "AgentRunStreamEventDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.AgentRunStatus?), TypeInfoPropertyName = "NullableAgentRunStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunIncompleteReason?), TypeInfoPropertyName = "NullableAgentRunIncompleteReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PendingActionDefaultDecision?), TypeInfoPropertyName = "NullablePendingActionDefaultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus?), TypeInfoPropertyName = "NullableV1AgentsAgentIdRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsRunsGetParametersStatus?), TypeInfoPropertyName = "NullableV1AgentsRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequestDecision?), TypeInfoPropertyName = "NullableSubmitAgentRunRequestDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepKind?), TypeInfoPropertyName = "NullableAgentRunStepKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunStepDelegationChildStatus?), TypeInfoPropertyName = "NullableRunStepDelegationChildStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepAddedEventKind?), TypeInfoPropertyName = "NullableAgentRunStepAddedEventKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStatusChangedEventStatus?), TypeInfoPropertyName = "NullableAgentRunStatusChangedEventStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunEndedEventStatus?), TypeInfoPropertyName = "NullableAgentRunEndedEventStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEvent?), TypeInfoPropertyName = "NullableAgentRunStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant1Type?), TypeInfoPropertyName = "NullableAgentRunStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant2Type?), TypeInfoPropertyName = "NullableAgentRunStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventVariant3Type?), TypeInfoPropertyName = "NullableAgentRunStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStreamEventDiscriminatorType?), TypeInfoPropertyName = "NullableAgentRunStreamEventDiscriminatorType2")] + [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))] + internal sealed partial class RunsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class RunsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static RunsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private RunsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.AgentRunStreamEventJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AgentRunStatus) + + || typeToConvert == typeof(global::Speechify.AgentRunStatus?) + + || typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason) + + || typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason?) + + || typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision) + + || typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision?) + + || typeToConvert == typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus) + + || typeToConvert == typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus?) + + || typeToConvert == typeof(global::Speechify.V1AgentsRunsGetParametersStatus) + + || typeToConvert == typeof(global::Speechify.V1AgentsRunsGetParametersStatus?) + + || typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision) + + || typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision?) + + || typeToConvert == typeof(global::Speechify.AgentRunStepKind) + + || typeToConvert == typeof(global::Speechify.AgentRunStepKind?) + + || typeToConvert == typeof(global::Speechify.RunStepDelegationChildStatus) + + || typeToConvert == typeof(global::Speechify.RunStepDelegationChildStatus?) + + || typeToConvert == typeof(global::Speechify.AgentRunStepAddedEventKind) + + || typeToConvert == typeof(global::Speechify.AgentRunStepAddedEventKind?) + + || typeToConvert == typeof(global::Speechify.AgentRunStatusChangedEventStatus) + + || typeToConvert == typeof(global::Speechify.AgentRunStatusChangedEventStatus?) + + || typeToConvert == typeof(global::Speechify.AgentRunEndedEventStatus) + + || typeToConvert == typeof(global::Speechify.AgentRunEndedEventStatus?) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant1Type) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant1Type?) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant2Type) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant2Type?) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant3Type) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant3Type?) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventDiscriminatorType) + + || typeToConvert == typeof(global::Speechify.AgentRunStreamEventDiscriminatorType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStatus)) + { + return new global::Speechify.JsonConverters.AgentRunStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStatus?)) + { + return new global::Speechify.JsonConverters.AgentRunStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason)) + { + return new global::Speechify.JsonConverters.AgentRunIncompleteReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason?)) + { + return new global::Speechify.JsonConverters.AgentRunIncompleteReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision)) + { + return new global::Speechify.JsonConverters.PendingActionDefaultDecisionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision?)) + { + return new global::Speechify.JsonConverters.PendingActionDefaultDecisionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus)) + { + return new global::Speechify.JsonConverters.V1AgentsAgentIdRunsGetParametersStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus?)) + { + return new global::Speechify.JsonConverters.V1AgentsAgentIdRunsGetParametersStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AgentsRunsGetParametersStatus)) + { + return new global::Speechify.JsonConverters.V1AgentsRunsGetParametersStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1AgentsRunsGetParametersStatus?)) + { + return new global::Speechify.JsonConverters.V1AgentsRunsGetParametersStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision)) + { + return new global::Speechify.JsonConverters.SubmitAgentRunRequestDecisionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision?)) + { + return new global::Speechify.JsonConverters.SubmitAgentRunRequestDecisionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStepKind)) + { + return new global::Speechify.JsonConverters.AgentRunStepKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStepKind?)) + { + return new global::Speechify.JsonConverters.AgentRunStepKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RunStepDelegationChildStatus)) + { + return new global::Speechify.JsonConverters.RunStepDelegationChildStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.RunStepDelegationChildStatus?)) + { + return new global::Speechify.JsonConverters.RunStepDelegationChildStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStepAddedEventKind)) + { + return new global::Speechify.JsonConverters.AgentRunStepAddedEventKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStepAddedEventKind?)) + { + return new global::Speechify.JsonConverters.AgentRunStepAddedEventKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStatusChangedEventStatus)) + { + return new global::Speechify.JsonConverters.AgentRunStatusChangedEventStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStatusChangedEventStatus?)) + { + return new global::Speechify.JsonConverters.AgentRunStatusChangedEventStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunEndedEventStatus)) + { + return new global::Speechify.JsonConverters.AgentRunEndedEventStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunEndedEventStatus?)) + { + return new global::Speechify.JsonConverters.AgentRunEndedEventStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant1Type)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant1Type?)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant2Type)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant2Type?)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant3Type)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventVariant3Type?)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventDiscriminatorType)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStreamEventDiscriminatorType?)) + { + return new global::Speechify.JsonConverters.AgentRunStreamEventDiscriminatorTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new RunsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.RunsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.RunsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..402a834 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.RunsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class RunsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.RunsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.RunsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..e0bce1b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.RunsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class RunsClient + { + /// + + public RunsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.RunsClient.g.cs b/src/libs/Speechify/Generated/Speechify.RunsClient.g.cs index 05c3775..5d3fb60 100644 --- a/src/libs/Speechify/Generated/Speechify.RunsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RunsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class RunsClient : global::Speechify.IRunsClient, global:: /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.RunsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ShareLinks.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.ShareLinks.JsonSerializerContext.g.cs new file mode 100644 index 0000000..6fcfe81 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ShareLinks.JsonSerializerContext.g.cs @@ -0,0 +1,264 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigStyle), TypeInfoPropertyName = "WidgetConfigStyle2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTheme), TypeInfoPropertyName = "WidgetConfigTheme2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigAvatarType), TypeInfoPropertyName = "WidgetConfigAvatarType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigAvatar))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigText))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTerms))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTranscript))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTelemetry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkStatus), TypeInfoPropertyName = "ShareLinkStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLink))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListShareLinksResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkResponseStatus), TypeInfoPropertyName = "CreateShareLinkResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RevealShareLinkTokenResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkPreview))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkSessionRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkSession))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.WidgetConfigStyle?), TypeInfoPropertyName = "NullableWidgetConfigStyle2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigTheme?), TypeInfoPropertyName = "NullableWidgetConfigTheme2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WidgetConfigAvatarType?), TypeInfoPropertyName = "NullableWidgetConfigAvatarType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkStatus?), TypeInfoPropertyName = "NullableShareLinkStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkResponseStatus?), TypeInfoPropertyName = "NullableCreateShareLinkResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class ShareLinksSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ShareLinksSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ShareLinksSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ShareLinksSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.WidgetConfigStyle) + + || typeToConvert == typeof(global::Speechify.WidgetConfigStyle?) + + || typeToConvert == typeof(global::Speechify.WidgetConfigTheme) + + || typeToConvert == typeof(global::Speechify.WidgetConfigTheme?) + + || typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType) + + || typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType?) + + || typeToConvert == typeof(global::Speechify.ShareLinkStatus) + + || typeToConvert == typeof(global::Speechify.ShareLinkStatus?) + + || typeToConvert == typeof(global::Speechify.CreateShareLinkResponseStatus) + + || typeToConvert == typeof(global::Speechify.CreateShareLinkResponseStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigStyle)) + { + return new global::Speechify.JsonConverters.WidgetConfigStyleJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigStyle?)) + { + return new global::Speechify.JsonConverters.WidgetConfigStyleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigTheme)) + { + return new global::Speechify.JsonConverters.WidgetConfigThemeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigTheme?)) + { + return new global::Speechify.JsonConverters.WidgetConfigThemeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType)) + { + return new global::Speechify.JsonConverters.WidgetConfigAvatarTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WidgetConfigAvatarType?)) + { + return new global::Speechify.JsonConverters.WidgetConfigAvatarTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ShareLinkStatus)) + { + return new global::Speechify.JsonConverters.ShareLinkStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ShareLinkStatus?)) + { + return new global::Speechify.JsonConverters.ShareLinkStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateShareLinkResponseStatus)) + { + return new global::Speechify.JsonConverters.CreateShareLinkResponseStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateShareLinkResponseStatus?)) + { + return new global::Speechify.JsonConverters.CreateShareLinkResponseStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ShareLinksSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..d9001e6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ShareLinksClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..238b073 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ShareLinksClient + { + /// + + public ShareLinksClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ShareLinksClient.g.cs b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.g.cs index 009cb8a..4cef606 100644 --- a/src/libs/Speechify/Generated/Speechify.ShareLinksClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ShareLinksClient : global::Speechify.IShareLinksClie /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ShareLinksSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.SipTrunks.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.SipTrunks.JsonSerializerContext.g.cs new file mode 100644 index 0000000..87dd602 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.SipTrunks.JsonSerializerContext.g.cs @@ -0,0 +1,238 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPTrunkProvider), TypeInfoPropertyName = "SIPTrunkProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPTrunkDirection), TypeInfoPropertyName = "SIPTrunkDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPTransport), TypeInfoPropertyName = "SIPTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPMediaEncryption), TypeInfoPropertyName = "SIPMediaEncryption2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPTrunk))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListSIPTrunksResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateSipTrunkRequestCredentials))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateSIPTrunkRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.SIPTrunkProvider?), TypeInfoPropertyName = "NullableSIPTrunkProvider2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPTrunkDirection?), TypeInfoPropertyName = "NullableSIPTrunkDirection2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPTransport?), TypeInfoPropertyName = "NullableSIPTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SIPMediaEncryption?), TypeInfoPropertyName = "NullableSIPMediaEncryption2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class SipTrunksSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class SipTrunksSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static SipTrunksSourceGenerationContext Default { get; } = new(DefaultOptions); + + private SipTrunksSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.SIPTrunkProvider) + + || typeToConvert == typeof(global::Speechify.SIPTrunkProvider?) + + || typeToConvert == typeof(global::Speechify.SIPTrunkDirection) + + || typeToConvert == typeof(global::Speechify.SIPTrunkDirection?) + + || typeToConvert == typeof(global::Speechify.SIPTransport) + + || typeToConvert == typeof(global::Speechify.SIPTransport?) + + || typeToConvert == typeof(global::Speechify.SIPMediaEncryption) + + || typeToConvert == typeof(global::Speechify.SIPMediaEncryption?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPTrunkProvider)) + { + return new global::Speechify.JsonConverters.SIPTrunkProviderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPTrunkProvider?)) + { + return new global::Speechify.JsonConverters.SIPTrunkProviderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPTrunkDirection)) + { + return new global::Speechify.JsonConverters.SIPTrunkDirectionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPTrunkDirection?)) + { + return new global::Speechify.JsonConverters.SIPTrunkDirectionNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPTransport)) + { + return new global::Speechify.JsonConverters.SIPTransportJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPTransport?)) + { + return new global::Speechify.JsonConverters.SIPTransportNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPMediaEncryption)) + { + return new global::Speechify.JsonConverters.SIPMediaEncryptionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SIPMediaEncryption?)) + { + return new global::Speechify.JsonConverters.SIPMediaEncryptionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new SipTrunksSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SipTrunksClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.SipTrunksClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..da49009 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.SipTrunksClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class SipTrunksClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SipTrunksClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.SipTrunksClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..7fb8764 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.SipTrunksClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class SipTrunksClient + { + /// + + public SipTrunksClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.SipTrunksClient.g.cs b/src/libs/Speechify/Generated/Speechify.SipTrunksClient.g.cs index 46af79f..b0c926e 100644 --- a/src/libs/Speechify/Generated/Speechify.SipTrunksClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SipTrunksClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class SipTrunksClient : global::Speechify.ISipTrunksClient /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SipTrunksSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Skills.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Skills.JsonSerializerContext.g.cs new file mode 100644 index 0000000..010a8a8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Skills.JsonSerializerContext.g.cs @@ -0,0 +1,178 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Skill))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListSkillsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateSkillRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateSkillRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkillVersion))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListSkillVersionsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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::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))] + internal sealed partial class SkillsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class SkillsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static SkillsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private SkillsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new SkillsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SkillsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.SkillsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..54c0fc1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.SkillsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class SkillsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.SkillsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.SkillsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..ffef77c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.SkillsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class SkillsClient + { + /// + + public SkillsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.SkillsClient.g.cs b/src/libs/Speechify/Generated/Speechify.SkillsClient.g.cs index 708daef..b3ca1f5 100644 --- a/src/libs/Speechify/Generated/Speechify.SkillsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SkillsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class SkillsClient : global::Speechify.ISkillsClient, glob /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SkillsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Stores.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Stores.JsonSerializerContext.g.cs new file mode 100644 index 0000000..afc46e0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Stores.JsonSerializerContext.g.cs @@ -0,0 +1,179 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [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.Store))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListStoresResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateStoreRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateStoreRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreCollection))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListStoreCollectionsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentStoresResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class StoresSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class StoresSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static StoresSourceGenerationContext Default { get; } = new(DefaultOptions); + + private StoresSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new StoresSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.StoresClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.StoresClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..df78bb7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.StoresClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class StoresClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.StoresClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.StoresClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..09bb529 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.StoresClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class StoresClient + { + /// + + public StoresClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.StoresClient.g.cs b/src/libs/Speechify/Generated/Speechify.StoresClient.g.cs index 5abde58..3f66445 100644 --- a/src/libs/Speechify/Generated/Speechify.StoresClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.StoresClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class StoresClient : global::Speechify.IStoresClient, glob /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.StoresSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Teams.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Teams.JsonSerializerContext.g.cs new file mode 100644 index 0000000..f606081 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Teams.JsonSerializerContext.g.cs @@ -0,0 +1,252 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStatus), TypeInfoPropertyName = "AgentRunStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunInputDelegationTargetsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunOutputTranscriptItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunOutput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunIncompleteReason), TypeInfoPropertyName = "AgentRunIncompleteReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunUsageModelsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunUsageToolsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunUsage))] + [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.PendingActionDefaultDecision), TypeInfoPropertyName = "PendingActionDefaultDecision2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PendingAction))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentRunsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TeamMember))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Team))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListTeamsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TeamMemberInput))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateTeamRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateTeamRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateTeamRunRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.AgentRunStatus?), TypeInfoPropertyName = "NullableAgentRunStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunIncompleteReason?), TypeInfoPropertyName = "NullableAgentRunIncompleteReason2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PendingActionDefaultDecision?), TypeInfoPropertyName = "NullablePendingActionDefaultDecision2")] + [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))] + internal sealed partial class TeamsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class TeamsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static TeamsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private TeamsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AgentRunStatus) + + || typeToConvert == typeof(global::Speechify.AgentRunStatus?) + + || typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason) + + || typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason?) + + || typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision) + + || typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStatus)) + { + return new global::Speechify.JsonConverters.AgentRunStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunStatus?)) + { + return new global::Speechify.JsonConverters.AgentRunStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason)) + { + return new global::Speechify.JsonConverters.AgentRunIncompleteReasonJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunIncompleteReason?)) + { + return new global::Speechify.JsonConverters.AgentRunIncompleteReasonNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision)) + { + return new global::Speechify.JsonConverters.PendingActionDefaultDecisionJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.PendingActionDefaultDecision?)) + { + return new global::Speechify.JsonConverters.PendingActionDefaultDecisionNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new TeamsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.TeamsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.TeamsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..0d72621 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.TeamsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class TeamsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.TeamsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.TeamsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..77528f4 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.TeamsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class TeamsClient + { + /// + + public TeamsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.TeamsClient.g.cs b/src/libs/Speechify/Generated/Speechify.TeamsClient.g.cs index 9a220a5..cb102e0 100644 --- a/src/libs/Speechify/Generated/Speechify.TeamsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.TeamsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class TeamsClient : global::Speechify.ITeamsClient, global /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.TeamsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Tests.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Tests.JsonSerializerContext.g.cs new file mode 100644 index 0000000..acc2b2d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Tests.JsonSerializerContext.g.cs @@ -0,0 +1,444 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.JobStatus), TypeInfoPropertyName = "JobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestType), TypeInfoPropertyName = "TestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessageRole), TypeInfoPropertyName = "SimulationMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ReplyConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckMode), TypeInfoPropertyName = "ParameterCheckMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheck))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolCallConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionMode), TypeInfoPropertyName = "DataAssertionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertion))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTestRequestConfig), TypeInfoPropertyName = "CreateAgentTestRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MockingStrategy), TypeInfoPropertyName = "MockingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolMock))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.NoMatchBehavior), TypeInfoPropertyName = "NoMatchBehavior2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolMockConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTestRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestConfig), TypeInfoPropertyName = "AgentTestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestVerdict), TypeInfoPropertyName = "TestVerdict2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ReplyResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolCallResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationToolCall))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResultSentiment), TypeInfoPropertyName = "SimulationResultSentiment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResultStatus), TypeInfoPropertyName = "SimulationCriterionResultStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResultMode), TypeInfoPropertyName = "DataAssertionResultMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResult))] + [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestRunResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestWithLastRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListTestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentTestRequestConfig), TypeInfoPropertyName = "UpdateAgentTestRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentTestRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestFolder))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentTestFoldersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTestFolderRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentTestFolderRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentTestRunsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunTarget))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestRunConfigOverride))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunTargetedTestsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SuiteRunTrigger), TypeInfoPropertyName = "SuiteRunTrigger2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestSuiteRunResults))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestSuiteRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunAgentTestsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BatchRunEntry))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunBatchRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListSuiteRunsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestSuiteRunWithRunsResults))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SuiteChildRun))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestSuiteRunWithRuns))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestStatsBucket))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestStats))] + [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.RunTestRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.JobStatus?), TypeInfoPropertyName = "NullableJobStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestType?), TypeInfoPropertyName = "NullableTestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessageRole?), TypeInfoPropertyName = "NullableSimulationMessageRole2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckMode?), TypeInfoPropertyName = "NullableParameterCheckMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionMode?), TypeInfoPropertyName = "NullableDataAssertionMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTestRequestConfig?), TypeInfoPropertyName = "NullableCreateAgentTestRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MockingStrategy?), TypeInfoPropertyName = "NullableMockingStrategy2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.NoMatchBehavior?), TypeInfoPropertyName = "NullableNoMatchBehavior2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTestConfig?), TypeInfoPropertyName = "NullableAgentTestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestVerdict?), TypeInfoPropertyName = "NullableTestVerdict2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResultSentiment?), TypeInfoPropertyName = "NullableSimulationResultSentiment2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResultStatus?), TypeInfoPropertyName = "NullableSimulationCriterionResultStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResultMode?), TypeInfoPropertyName = "NullableDataAssertionResultMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentTestRequestConfig?), TypeInfoPropertyName = "NullableUpdateAgentTestRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SuiteRunTrigger?), TypeInfoPropertyName = "NullableSuiteRunTrigger2")] + [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))] + internal sealed partial class TestsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class TestsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static TestsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private TestsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.CreateAgentTestRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.AgentTestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UpdateAgentTestRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.JobStatus) + + || typeToConvert == typeof(global::Speechify.JobStatus?) + + || typeToConvert == typeof(global::Speechify.TestType) + + || typeToConvert == typeof(global::Speechify.TestType?) + + || typeToConvert == typeof(global::Speechify.SimulationMessageRole) + + || typeToConvert == typeof(global::Speechify.SimulationMessageRole?) + + || typeToConvert == typeof(global::Speechify.ParameterCheckMode) + + || typeToConvert == typeof(global::Speechify.ParameterCheckMode?) + + || typeToConvert == typeof(global::Speechify.DataAssertionMode) + + || typeToConvert == typeof(global::Speechify.DataAssertionMode?) + + || typeToConvert == typeof(global::Speechify.MockingStrategy) + + || typeToConvert == typeof(global::Speechify.MockingStrategy?) + + || typeToConvert == typeof(global::Speechify.NoMatchBehavior) + + || typeToConvert == typeof(global::Speechify.NoMatchBehavior?) + + || typeToConvert == typeof(global::Speechify.TestVerdict) + + || typeToConvert == typeof(global::Speechify.TestVerdict?) + + || typeToConvert == typeof(global::Speechify.SimulationResultSentiment) + + || typeToConvert == typeof(global::Speechify.SimulationResultSentiment?) + + || typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus) + + || typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus?) + + || typeToConvert == typeof(global::Speechify.DataAssertionResultMode) + + || typeToConvert == typeof(global::Speechify.DataAssertionResultMode?) + + || typeToConvert == typeof(global::Speechify.SuiteRunTrigger) + + || typeToConvert == typeof(global::Speechify.SuiteRunTrigger?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus)) + { + return new global::Speechify.JsonConverters.JobStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.JobStatus?)) + { + return new global::Speechify.JsonConverters.JobStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestType)) + { + return new global::Speechify.JsonConverters.TestTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestType?)) + { + return new global::Speechify.JsonConverters.TestTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationMessageRole)) + { + return new global::Speechify.JsonConverters.SimulationMessageRoleJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationMessageRole?)) + { + return new global::Speechify.JsonConverters.SimulationMessageRoleNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ParameterCheckMode)) + { + return new global::Speechify.JsonConverters.ParameterCheckModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ParameterCheckMode?)) + { + return new global::Speechify.JsonConverters.ParameterCheckModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataAssertionMode)) + { + return new global::Speechify.JsonConverters.DataAssertionModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataAssertionMode?)) + { + return new global::Speechify.JsonConverters.DataAssertionModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MockingStrategy)) + { + return new global::Speechify.JsonConverters.MockingStrategyJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MockingStrategy?)) + { + return new global::Speechify.JsonConverters.MockingStrategyNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.NoMatchBehavior)) + { + return new global::Speechify.JsonConverters.NoMatchBehaviorJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.NoMatchBehavior?)) + { + return new global::Speechify.JsonConverters.NoMatchBehaviorNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestVerdict)) + { + return new global::Speechify.JsonConverters.TestVerdictJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestVerdict?)) + { + return new global::Speechify.JsonConverters.TestVerdictNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationResultSentiment)) + { + return new global::Speechify.JsonConverters.SimulationResultSentimentJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationResultSentiment?)) + { + return new global::Speechify.JsonConverters.SimulationResultSentimentNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus)) + { + return new global::Speechify.JsonConverters.SimulationCriterionResultStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SimulationCriterionResultStatus?)) + { + return new global::Speechify.JsonConverters.SimulationCriterionResultStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataAssertionResultMode)) + { + return new global::Speechify.JsonConverters.DataAssertionResultModeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.DataAssertionResultMode?)) + { + return new global::Speechify.JsonConverters.DataAssertionResultModeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SuiteRunTrigger)) + { + return new global::Speechify.JsonConverters.SuiteRunTriggerJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.SuiteRunTrigger?)) + { + return new global::Speechify.JsonConverters.SuiteRunTriggerNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new TestsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.TestsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.TestsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..8418df1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.TestsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class TestsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.TestsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.TestsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..8edb2c9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.TestsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class TestsClient + { + /// + + public TestsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.TestsClient.g.cs b/src/libs/Speechify/Generated/Speechify.TestsClient.g.cs index c576997..35abb93 100644 --- a/src/libs/Speechify/Generated/Speechify.TestsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.TestsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class TestsClient : global::Speechify.ITestsClient, global /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.TestsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs new file mode 100644 index 0000000..a80a1fe --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs @@ -0,0 +1,459 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolKind), TypeInfoPropertyName = "ToolKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolParamType), TypeInfoPropertyName = "ToolParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookToolConfigMethod), TypeInfoPropertyName = "WebhookToolConfigMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset), TypeInfoPropertyName = "LongRunningToolConfigWaitAudioPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigWaitAudio))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigOnDuplicate), TypeInfoPropertyName = "LongRunningToolConfigOnDuplicate2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ClientToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPTransport), TypeInfoPropertyName = "MCPTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuth), TypeInfoPropertyName = "MCPAuth2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant1Type), TypeInfoPropertyName = "MCPAuthVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant2Type), TypeInfoPropertyName = "MCPAuthVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type), TypeInfoPropertyName = "MCPAuthVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType), TypeInfoPropertyName = "MCPAuthDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass), TypeInfoPropertyName = "ToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass), TypeInfoPropertyName = "ToolApprovalClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach), TypeInfoPropertyName = "ToolReach2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolderKind), TypeInfoPropertyName = "ToolNameHolderKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolder))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameTakenErrorDetailDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameTakenErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameTakenError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolConfig), TypeInfoPropertyName = "ToolConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Tool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListToolsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateToolRequestConfig), TypeInfoPropertyName = "CreateToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateToolRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateToolRequestConfig), TypeInfoPropertyName = "UpdateToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateToolRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAttachedAgent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListToolAttachedAgentsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestMCPConnectionRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPProbeTool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.McpProbeErrorDetailsStage), TypeInfoPropertyName = "McpProbeErrorDetailsStage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPProbeErrorDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPProbeResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestWebhookConnectionRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookProbeResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.ToolKind?), TypeInfoPropertyName = "NullableToolKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolParamType?), TypeInfoPropertyName = "NullableToolParamType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookToolConfigMethod?), TypeInfoPropertyName = "NullableWebhookToolConfigMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset?), TypeInfoPropertyName = "NullableLongRunningToolConfigWaitAudioPreset2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.LongRunningToolConfigOnDuplicate?), TypeInfoPropertyName = "NullableLongRunningToolConfigOnDuplicate2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPTransport?), TypeInfoPropertyName = "NullableMCPTransport2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuth?), TypeInfoPropertyName = "NullableMCPAuth2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant1Type?), TypeInfoPropertyName = "NullableMCPAuthVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant2Type?), TypeInfoPropertyName = "NullableMCPAuthVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type?), TypeInfoPropertyName = "NullableMCPAuthVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType?), TypeInfoPropertyName = "NullableMCPAuthDiscriminatorType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass?), TypeInfoPropertyName = "NullableToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass?), TypeInfoPropertyName = "NullableToolApprovalClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach?), TypeInfoPropertyName = "NullableToolReach2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolderKind?), TypeInfoPropertyName = "NullableToolNameHolderKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolConfig?), TypeInfoPropertyName = "NullableToolConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateToolRequestConfig?), TypeInfoPropertyName = "NullableCreateToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateToolRequestConfig?), TypeInfoPropertyName = "NullableUpdateToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.McpProbeErrorDetailsStage?), TypeInfoPropertyName = "NullableMcpProbeErrorDetailsStage2")] + [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))] + internal sealed partial class ToolDefinitionsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class ToolDefinitionsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ToolDefinitionsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ToolDefinitionsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.MCPAuthJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.ToolConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.CreateToolRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UpdateToolRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.ToolKind) + + || typeToConvert == typeof(global::Speechify.ToolKind?) + + || typeToConvert == typeof(global::Speechify.ToolParamType) + + || typeToConvert == typeof(global::Speechify.ToolParamType?) + + || typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod) + + || typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod?) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset?) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate) + + || typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate?) + + || typeToConvert == typeof(global::Speechify.MCPTransport) + + || typeToConvert == typeof(global::Speechify.MCPTransport?) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type?) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type?) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type) + + || typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type?) + + || typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType) + + || typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType?) + + || typeToConvert == typeof(global::Speechify.ToolActionClass) + + || typeToConvert == typeof(global::Speechify.ToolActionClass?) + + || typeToConvert == typeof(global::Speechify.ToolApprovalClass) + + || typeToConvert == typeof(global::Speechify.ToolApprovalClass?) + + || typeToConvert == typeof(global::Speechify.ToolReach) + + || typeToConvert == typeof(global::Speechify.ToolReach?) + + || typeToConvert == typeof(global::Speechify.ToolNameHolderKind) + + || typeToConvert == typeof(global::Speechify.ToolNameHolderKind?) + + || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage) + + || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolKind)) + { + return new global::Speechify.JsonConverters.ToolKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolKind?)) + { + return new global::Speechify.JsonConverters.ToolKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolParamType)) + { + return new global::Speechify.JsonConverters.ToolParamTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolParamType?)) + { + return new global::Speechify.JsonConverters.ToolParamTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod)) + { + return new global::Speechify.JsonConverters.WebhookToolConfigMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.WebhookToolConfigMethod?)) + { + return new global::Speechify.JsonConverters.WebhookToolConfigMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigWaitAudioPresetJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigWaitAudioPreset?)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigWaitAudioPresetNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigOnDuplicateJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.LongRunningToolConfigOnDuplicate?)) + { + return new global::Speechify.JsonConverters.LongRunningToolConfigOnDuplicateNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPTransport)) + { + return new global::Speechify.JsonConverters.MCPTransportJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPTransport?)) + { + return new global::Speechify.JsonConverters.MCPTransportNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant1Type?)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant2Type?)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthVariant3Type?)) + { + return new global::Speechify.JsonConverters.MCPAuthVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType)) + { + return new global::Speechify.JsonConverters.MCPAuthDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.MCPAuthDiscriminatorType?)) + { + return new global::Speechify.JsonConverters.MCPAuthDiscriminatorTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolActionClass)) + { + return new global::Speechify.JsonConverters.ToolActionClassJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolActionClass?)) + { + return new global::Speechify.JsonConverters.ToolActionClassNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass)) + { + return new global::Speechify.JsonConverters.ToolApprovalClassJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass?)) + { + return new global::Speechify.JsonConverters.ToolApprovalClassNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolReach)) + { + return new global::Speechify.JsonConverters.ToolReachJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolReach?)) + { + return new global::Speechify.JsonConverters.ToolReachNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolNameHolderKind)) + { + return new global::Speechify.JsonConverters.ToolNameHolderKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolNameHolderKind?)) + { + return new global::Speechify.JsonConverters.ToolNameHolderKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage)) + { + return new global::Speechify.JsonConverters.McpProbeErrorDetailsStageJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?)) + { + return new global::Speechify.JsonConverters.McpProbeErrorDetailsStageNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new ToolDefinitionsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..215fa12 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ToolDefinitionsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..3d97dac --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class ToolDefinitionsClient + { + /// + + public ToolDefinitionsClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.ToolDefinitionsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.g.cs index bf408d2..3b9ceff 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class ToolDefinitionsClient : global::Speechify.IToolDefin /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.ToolDefinitionsSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Triggers.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Triggers.JsonSerializerContext.g.cs new file mode 100644 index 0000000..fbd60e7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Triggers.JsonSerializerContext.g.cs @@ -0,0 +1,259 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerType), TypeInfoPropertyName = "AgentTriggerType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TriggerRunSpec))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TriggerScheduleConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TriggerWebhookConfigUserIdentitySource), TypeInfoPropertyName = "TriggerWebhookConfigUserIdentitySource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TriggerWebhookConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerLastFireStatus), TypeInfoPropertyName = "AgentTriggerLastFireStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TriggerThread))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTrigger))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentTriggersResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTriggerRequestType), TypeInfoPropertyName = "CreateAgentTriggerRequestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTriggerRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentTriggerRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerFireResponseStatus), TypeInfoPropertyName = "AgentTriggerFireResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerFireResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [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.AgentTriggerType?), TypeInfoPropertyName = "NullableAgentTriggerType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TriggerWebhookConfigUserIdentitySource?), TypeInfoPropertyName = "NullableTriggerWebhookConfigUserIdentitySource2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerLastFireStatus?), TypeInfoPropertyName = "NullableAgentTriggerLastFireStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTriggerRequestType?), TypeInfoPropertyName = "NullableCreateAgentTriggerRequestType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerFireResponseStatus?), TypeInfoPropertyName = "NullableAgentTriggerFireResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class TriggersSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class TriggersSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static TriggersSourceGenerationContext Default { get; } = new(DefaultOptions); + + private TriggersSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.AgentTriggerType) + + || typeToConvert == typeof(global::Speechify.AgentTriggerType?) + + || typeToConvert == typeof(global::Speechify.TriggerWebhookConfigUserIdentitySource) + + || typeToConvert == typeof(global::Speechify.TriggerWebhookConfigUserIdentitySource?) + + || typeToConvert == typeof(global::Speechify.AgentTriggerLastFireStatus) + + || typeToConvert == typeof(global::Speechify.AgentTriggerLastFireStatus?) + + || typeToConvert == typeof(global::Speechify.CreateAgentTriggerRequestType) + + || typeToConvert == typeof(global::Speechify.CreateAgentTriggerRequestType?) + + || typeToConvert == typeof(global::Speechify.AgentTriggerFireResponseStatus) + + || typeToConvert == typeof(global::Speechify.AgentTriggerFireResponseStatus?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTriggerType)) + { + return new global::Speechify.JsonConverters.AgentTriggerTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTriggerType?)) + { + return new global::Speechify.JsonConverters.AgentTriggerTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TriggerWebhookConfigUserIdentitySource)) + { + return new global::Speechify.JsonConverters.TriggerWebhookConfigUserIdentitySourceJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TriggerWebhookConfigUserIdentitySource?)) + { + return new global::Speechify.JsonConverters.TriggerWebhookConfigUserIdentitySourceNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTriggerLastFireStatus)) + { + return new global::Speechify.JsonConverters.AgentTriggerLastFireStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTriggerLastFireStatus?)) + { + return new global::Speechify.JsonConverters.AgentTriggerLastFireStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateAgentTriggerRequestType)) + { + return new global::Speechify.JsonConverters.CreateAgentTriggerRequestTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CreateAgentTriggerRequestType?)) + { + return new global::Speechify.JsonConverters.CreateAgentTriggerRequestTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTriggerFireResponseStatus)) + { + return new global::Speechify.JsonConverters.AgentTriggerFireResponseStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentTriggerFireResponseStatus?)) + { + return new global::Speechify.JsonConverters.AgentTriggerFireResponseStatusNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new TriggersSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.TriggersClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.TriggersClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..dbddb91 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.TriggersClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class TriggersClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.TriggersClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.TriggersClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..05d3cea --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.TriggersClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class TriggersClient + { + /// + + public TriggersClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.TriggersClient.g.cs b/src/libs/Speechify/Generated/Speechify.TriggersClient.g.cs index 2518e25..8b9e70f 100644 --- a/src/libs/Speechify/Generated/Speechify.TriggersClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.TriggersClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class TriggersClient : global::Speechify.ITriggersClient, /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.TriggersSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Voices.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Voices.JsonSerializerContext.g.cs new file mode 100644 index 0000000..1c8a5ff --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Voices.JsonSerializerContext.g.cs @@ -0,0 +1,274 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1VoicesGetParametersType), TypeInfoPropertyName = "V1VoicesGetParametersType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1VoicesGetParametersGender), TypeInfoPropertyName = "V1VoicesGetParametersGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoiceGender), TypeInfoPropertyName = "GetVoiceGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoiceLanguage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoicesModelName), TypeInfoPropertyName = "GetVoicesModelName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoicesModel))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoiceType), TypeInfoPropertyName = "GetVoiceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoice))] + [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.ListVoicesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender), TypeInfoPropertyName = "V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1VoicesGetParametersType?), TypeInfoPropertyName = "NullableV1VoicesGetParametersType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1VoicesGetParametersGender?), TypeInfoPropertyName = "NullableV1VoicesGetParametersGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoiceGender?), TypeInfoPropertyName = "NullableGetVoiceGender2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoicesModelName?), TypeInfoPropertyName = "NullableGetVoicesModelName2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetVoiceType?), TypeInfoPropertyName = "NullableGetVoiceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender?), TypeInfoPropertyName = "NullableV1VoicesPostRequestBodyContentMultipartFormDataSchemaGender2")] + [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))] + internal sealed partial class VoicesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class VoicesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static VoicesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private VoicesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.V1VoicesGetParametersType) + + || typeToConvert == typeof(global::Speechify.V1VoicesGetParametersType?) + + || typeToConvert == typeof(global::Speechify.V1VoicesGetParametersGender) + + || typeToConvert == typeof(global::Speechify.V1VoicesGetParametersGender?) + + || typeToConvert == typeof(global::Speechify.GetVoiceGender) + + || typeToConvert == typeof(global::Speechify.GetVoiceGender?) + + || typeToConvert == typeof(global::Speechify.GetVoicesModelName) + + || typeToConvert == typeof(global::Speechify.GetVoicesModelName?) + + || typeToConvert == typeof(global::Speechify.GetVoiceType) + + || typeToConvert == typeof(global::Speechify.GetVoiceType?) + + || typeToConvert == typeof(global::Speechify.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender) + + || typeToConvert == typeof(global::Speechify.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1VoicesGetParametersType)) + { + return new global::Speechify.JsonConverters.V1VoicesGetParametersTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1VoicesGetParametersType?)) + { + return new global::Speechify.JsonConverters.V1VoicesGetParametersTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1VoicesGetParametersGender)) + { + return new global::Speechify.JsonConverters.V1VoicesGetParametersGenderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1VoicesGetParametersGender?)) + { + return new global::Speechify.JsonConverters.V1VoicesGetParametersGenderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetVoiceGender)) + { + return new global::Speechify.JsonConverters.GetVoiceGenderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetVoiceGender?)) + { + return new global::Speechify.JsonConverters.GetVoiceGenderNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetVoicesModelName)) + { + return new global::Speechify.JsonConverters.GetVoicesModelNameJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetVoicesModelName?)) + { + return new global::Speechify.JsonConverters.GetVoicesModelNameNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetVoiceType)) + { + return new global::Speechify.JsonConverters.GetVoiceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.GetVoiceType?)) + { + return new global::Speechify.JsonConverters.GetVoiceTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender)) + { + return new global::Speechify.JsonConverters.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGenderJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender?)) + { + return new global::Speechify.JsonConverters.V1VoicesPostRequestBodyContentMultipartFormDataSchemaGenderNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new VoicesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.VoicesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.VoicesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..20cc4c9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.VoicesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class VoicesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.VoicesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.VoicesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..fca3a73 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.VoicesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class VoicesClient + { + /// + + public VoicesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.VoicesClient.g.cs b/src/libs/Speechify/Generated/Speechify.VoicesClient.g.cs index 09d5c37..4724c17 100644 --- a/src/libs/Speechify/Generated/Speechify.VoicesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.VoicesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class VoicesClient : global::Speechify.IVoicesClient, glob /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.VoicesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Watermark.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Watermark.JsonSerializerContext.g.cs new file mode 100644 index 0000000..e3c89fe --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Watermark.JsonSerializerContext.g.cs @@ -0,0 +1,169 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WatermarkDetectionResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WatermarkVerificationResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DetectRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.VerifyRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + internal sealed partial class WatermarkSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class WatermarkSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static WatermarkSourceGenerationContext Default { get; } = new(DefaultOptions); + + private WatermarkSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new WatermarkSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.WatermarkClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.WatermarkClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..39168a2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.WatermarkClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class WatermarkClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.WatermarkClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.WatermarkClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..07bfaf3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.WatermarkClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class WatermarkClient + { + /// + + public WatermarkClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.WatermarkClient.g.cs b/src/libs/Speechify/Generated/Speechify.WatermarkClient.g.cs index a2fee65..a623bd1 100644 --- a/src/libs/Speechify/Generated/Speechify.WatermarkClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.WatermarkClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class WatermarkClient : global::Speechify.IWatermarkClient /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.WatermarkSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Workspaces.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Workspaces.JsonSerializerContext.g.cs new file mode 100644 index 0000000..cb1b442 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Workspaces.JsonSerializerContext.g.cs @@ -0,0 +1,185 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BillingEntitlementsMaxLlmModelClass), TypeInfoPropertyName = "BillingEntitlementsMaxLlmModelClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BillingEntitlements))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.EntitlementsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BillingEntitlementsMaxLlmModelClass?), TypeInfoPropertyName = "NullableBillingEntitlementsMaxLlmModelClass2")] + internal sealed partial class WorkspacesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class WorkspacesSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static WorkspacesSourceGenerationContext Default { get; } = new(DefaultOptions); + + private WorkspacesSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.BillingEntitlementsMaxLlmModelClass) + + || typeToConvert == typeof(global::Speechify.BillingEntitlementsMaxLlmModelClass?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.BillingEntitlementsMaxLlmModelClass)) + { + return new global::Speechify.JsonConverters.BillingEntitlementsMaxLlmModelClassJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.BillingEntitlementsMaxLlmModelClass?)) + { + return new global::Speechify.JsonConverters.BillingEntitlementsMaxLlmModelClassNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new WorkspacesSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.WorkspacesClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.WorkspacesClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..4985bde --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.WorkspacesClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class WorkspacesClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.WorkspacesClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.WorkspacesClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..aa5e572 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.WorkspacesClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class WorkspacesClient + { + /// + + public WorkspacesClient( + string apiKey, + 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, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + 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.WorkspacesClient.g.cs b/src/libs/Speechify/Generated/Speechify.WorkspacesClient.g.cs index 4ac180a..5ffda1a 100644 --- a/src/libs/Speechify/Generated/Speechify.WorkspacesClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.WorkspacesClient.g.cs @@ -38,7 +38,7 @@ public sealed partial class WorkspacesClient : global::Speechify.IWorkspacesClie /// public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); - internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.SourceGenerationContext.Default); + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.WorkspacesSourceGenerationContext.Default); /// /// diff --git a/src/libs/Speechify/openapi.yaml b/src/libs/Speechify/openapi.yaml index 184ac86..886e282 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":"audio_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 JSON response.\nFor low-latency playback or long-form text, use POST /v1/audio/stream.\nSet `output_format` for explicit sample-rate/bitrate control (e.g.\n`pcm_16000` or `ulaw_8000` for telephony).","tags":["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":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech audio for the requested input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSpeechRequest"}}}}}},"/v1/audio/stream":{"post":{"operationId":"audio_stream","summary":"Stream Speech","description":"Synthesize speech and stream the audio back as it is generated, for\nlow-latency playback. Set `output_format` in the body for explicit\ncodec/sample-rate/bitrate control (e.g. `pcm_16000` or `ulaw_8000` for\ntelephony), or fall back to the Accept header for the container; the\nresponse is raw audio bytes (HTTP chunked). For Base64-encoded audio\nwith speech-mark metadata in a single JSON response, use\nPOST /v1/audio/speech.","tags":["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":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Selects the audio container/codec for the streamed response when\n`output_format` is not set in the request body. The response\nContent-Type echoes this value, except `audio/pcm` returns\n`audio/L16` with rate and channels parameters (raw 16-bit linear\nPCM, 24 kHz mono, little-endian). For explicit sample-rate/bitrate\ncontrol (e.g. `pcm_16000`, `ulaw_8000`), set `output_format` in the\nbody instead; it takes precedence over this header.","required":false,"schema":{"$ref":"#/components/schemas/V1AudioStreamPostParametersAccept"}}],"responses":{"200":{"description":"Streamed audio. When `output_format` is set it selects the\ncodec/sample rate; otherwise the Accept header does. The\nContent-Type reflects the selected format: it matches the Accept\nheader, except raw PCM returns `audio/L16` (with rate and channels\nparameters) and u-law returns `audio/basic`.","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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStreamRequest"}}}}}},"/v1/audio/stream/with-timestamps":{"post":{"operationId":"audio_streamWithTimestamps","summary":"Stream Speech With Timestamps","description":"Synthesize speech and stream it back together with word-level speech\nmarks, for text highlighting, captions and audio-text synchronization\nwhile the audio is still arriving.\n\nThe response is a Server-Sent Events stream. Each `speech.chunk` event\ncarries a Base64-encoded run of audio, the speech marks that became\nfinal with it, or both - a chunk may carry only one of the two, and the\nlast chunk of a stream is often marks-only. A terminal `speech.done`\nevent ends the stream; there is no `[DONE]` sentinel. Ignore any event\ntype you do not recognize, so that new event types do not break your\nintegration.\n\nSpeech-mark times are absolute milliseconds from the start of the\nsynthesis, so concatenate the audio chunks into one stream and apply the\nmarks against that single timeline. Which chunk a mark arrives on is a\ndelivery detail and carries no meaning. Times stay correct for every\n`output_format`: changing the codec or sample rate does not change the\nduration.\n\nSpeech marks are produced by the streaming-native models. The default\n`simba-3.0` and `simba-3.2` both serve this route. The legacy\n`simba-english` and `simba-multilingual` models never could: on a\nworkspace pinned before API version `2026-09-21` they return 400\n`speech_marks_unsupported` here, and from that version on they return\n400 `model_retired` on every synthesis route. Both are switched off\nentirely on 2026-11-21.\nFor Base64-encoded audio and speech marks in one non-streamed JSON\nresponse, on any model, use POST /v1/audio/speech.","tags":["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":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Selects the audio container/codec carried inside the events when\n`output_format` is not set in the request body. The selected media\ntype is echoed on the `Speechify-Audio-Content-Type` response\nheader, since the response's own Content-Type is `text/event-stream`.","required":false,"schema":{"$ref":"#/components/schemas/V1AudioStreamWithTimestampsPostParametersAccept"}}],"responses":{"200":{"description":"A Server-Sent Events stream of `speech.chunk` events followed by one\nterminal `speech.done` event. A failure after the stream has started\nis delivered as a `speech.error` event carrying the standard error\nenvelope, because the status code is already committed.\n\nThe transport is `text/event-stream`: each event is an\n`event:`/`data:` pair whose `data` is one JSON payload matching the\nschema below. The payload's `type` field mirrors the `event:` name,\nso the stream is also parseable from `data:` lines alone. Ignore\nevent types you do not recognize.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/SpeechStreamEvent"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStreamRequest"}}}}}},"/v1/voices":{"get":{"operationId":"voices_list","summary":"List Voices","description":"Lists the voices available to the caller - the shared voice\ncatalog plus the cloned voices they can reach, whichever member or\nservice-account key created them. A clone filed under a project is\nlisted only for a caller who can reach that project; a clone no\nproject filed is shared with the whole workspace and is listed for\neveryone in it. By default\nthe full catalogue is returned in one response. Pagination is\nopt-in: pass `limit` (and then `cursor` from the previous\nresponse) to page through the list while `has_more` is true. Max\npage size is 200. Narrow the list with the `type` and `locale`\nfilters.\n\nA page can come back with fewer than `limit` voices, and a short\npage - an empty one included - is not the end of the list. Keep\nfollowing `next_cursor` while `has_more` is true.","tags":["voices"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"type","in":"query","description":"Filter by voice type: `personal` (the workspace's cloned voices)\nor `shared` (the public catalogue). Omit to return both.","required":false,"schema":{"$ref":"#/components/schemas/V1VoicesGetParametersType"}},{"name":"locale","in":"query","description":"Filter to voices whose locale matches this BCP-47 language range,\nprefix-matched: `en` matches `en-US` and `en-GB`; `en-US` matches\nonly `en-US`. Case-insensitive. Omit to return all locales.","required":false,"schema":{"type":"string"}},{"name":"gender","in":"query","description":"Filter by voice gender. Omit to return all genders.","required":false,"schema":{"$ref":"#/components/schemas/V1VoicesGetParametersGender"}},{"name":"model","in":"query","description":"Filter to voices that support this model (as listed in each voice's\n`models[]`), e.g. `simba-3.2`. Omit to return voices for all models.","required":false,"schema":{"type":"string"}},{"name":"project_id","in":"query","description":"Filter cloned voices by workspace project: omit for every voice you\ncan reach, pass the literal `shared` for the clones no project\nfiled, or a `proj_...` id for the clones filed under that project.\nThe shared catalog carries no project and is returned either way.\n\nA clone is filed under a project when a project-pinned key created\nit. A clone with no project is shared with the whole workspace\nrather than sitting in a Default project, so the literal here is\n`shared`, never `default` - passing `default` is a 400. Returns 404\nproject_not_found for a malformed id and for any project outside\nyour reach: a project-pinned key reaches only its pinned project,\nand a member holding project grants reaches only the granted ones.\nThat 404 is the same in every case and does not reveal whether such\na project exists. `shared` is always inside your reach.\n","required":false,"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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The voice catalogue (or a page of it when `limit` is set).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVoicesResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}},"post":{"operationId":"voices_create","summary":"Create Voice","description":"Create a cloned voice for the workspace from a 10-30 second audio sample, with verified consent from the speaker.\n\nCloning requires proof that the speaker agreed to it. Create a consent challenge with `POST /v1/voices/consent-challenges`, show the returned `phrase` to the speaker, record them reading it aloud, and send that recording here as `consent_recording` together with the challenge's `consent_challenge_id`. Speechify transcribes the recording, checks it against the phrase it issued, checks that its speaker is the speaker in your `sample`, and keeps it as the consent record for the voice. The person consenting therefore has to be the person being cloned. A challenge is single use and short-lived, so record and submit in one sitting.\n\nThe clone belongs to the workspace rather than the member who created it, and access follows the caller's workspace role and API-key scopes exactly as for any other voice: voices scopes to list it, audio scopes to synthesize with it, and the content-management permission plus a write scope on the key to delete it. Cloned voices are usable self-serve on `simba-3.0` (and, on a workspace pinned before API version `2026-09-21`, on the retired `simba-english` and `simba-multilingual` until they are switched off on 2026-11-21). `simba-3.2` also serves cloned voices.\n\nCallers pinned before `Speechify-Version: 2026-09-13` use the previous flow instead: no challenge, and a `consent` form field carrying the speaker's name and email as a JSON string. That flow is deprecated and will be removed after a sunset window announced in the changelog.","tags":["voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"A created voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoice"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. the file\nupload cap, KB document upload cap, batch-call CSV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender","description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnot_specified GenderNotSpecified"},"sample":{"type":"string","format":"binary","description":"Audio sample of the voice to clone, 10-30 seconds of clean speech."},"avatar":{"type":"string","format":"binary","description":"Avatar image file"},"consent_challenge_id":{"type":"string","description":"The `id` of the consent challenge this create consumes, from\n`POST /v1/voices/consent-challenges`. Single use: once a\ncreate has consumed it, whether or not that create\nsucceeded, it cannot be used again."},"consent_recording":{"type":"string","format":"binary","description":"Recording of the speaker reading the challenge's `phrase`\naloud. This is the consent record for the voice, not a\nsecond voice sample: it must be the same person as in\n`sample`, and it is retained as evidence. 5-30 seconds, at\nmost 25 MB, in any common audio container."}},"required":["name","gender","sample","consent_challenge_id","consent_recording"]}}}}}},"/v1/voices/consent-challenges":{"post":{"operationId":"consentChallenges_create","summary":"Create Consent Challenge","description":"Start the consent check for a voice clone.\n\nReturns a `phrase` for the speaker to read aloud and an `id` that identifies this challenge. Show the phrase to the speaker exactly as returned, record them reading it, then send the recording and the `id` to `POST /v1/voices`, which verifies the recording against the phrase and against the voice sample being cloned, then keeps it as the consent record.\n\nA challenge is single use, is bound to the workspace that created it, and expires at `expires_at` - it is proof that a speaker was in front of a microphone just now, so create it when you are ready to record, not at the start of your flow. If it expires, create another one and record again.\n\nChallenge creation is rate limited per workspace at a few dozen per hour, far more tightly than the rest of the voice surface, because each one precedes a person recording themselves - mint it when your speaker is ready, not speculatively. Read the live ceiling off `RateLimit-*` rather than hard-coding it. **On a `429`, always honour `Retry-After` rather than a fixed backoff of your own**: the wait is measured in minutes and can run to most of an hour. `RateLimit-*` are omitted rather than reporting a bucket that is not the one refusing.","tags":["consentChallenges"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"The created consent challenge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentChallenge"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConsentChallengeRequest"}}}}}},"/v1/voices/{voice_id}":{"get":{"operationId":"voices_get","summary":"Get Voice","description":"Fetch a single voice by id - a shared catalogue voice or one of\nthe workspace's cloned voices. A cloned voice that belongs to\nanother workspace returns 404, identical to an unknown id, so\nvoice inventory is never enumerable across tenants.","tags":["voices"],"parameters":[{"name":"voice_id","in":"path","description":"The ID of the voice to fetch","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoice"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"voices_delete","summary":"Delete Voice","description":"Delete one of the workspace's cloned voices. Requires the\n`content.manage` permission (owner, admin, or member); a\nservice-account key is authorized by its scopes instead.","tags":["voices"],"parameters":[{"name":"voice_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"}},{"name":"Speechify-Version","in":"header","required":false,"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/voices/{voice_id}/sample":{"get":{"operationId":"voices_downloadSample","summary":"Download Voice Sample","description":"Download a personal (cloned) voice sample","tags":["voices"],"parameters":[{"name":"voice_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"}},{"name":"Speechify-Version","in":"header","required":false,"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audio/models":{"get":{"operationId":"models_list","summary":"List Models","description":"List the text-to-speech models available for synthesis. Drive a model\npicker from this response, then pass a model `id` as the `model`\nparameter to POST /v1/audio/speech or /v1/audio/stream. The response\nmarks the default model (used when a request omits `model`), the\nroutes each model may be passed to, and which voices it accepts.\nMulti-speaker models arrive in a separate `dialogue_models` array\nbecause they are valid only on POST /v1/audio/dialogue. Returns\nthe full set in a single response: the model catalog is static\nplatform reference data, so it is intentionally not paginated.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The available text-to-speech models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}}},"/v1/audio/watermark/detect":{"post":{"operationId":"watermark_detect","summary":"Detect Watermark","description":"Check whether a clip carries the watermark Speechify seals into audio it\ngenerates. Upload the audio as `audio`; nothing about it is stored, and\nno voice is read or written.\n\nRead the answer carefully in one direction. A `watermarked: true` is\npositive evidence that the audio came from Speechify synthesis. A\n`watermarked: false` is NOT proof that it did not: only models\nredeployed since the watermark shipped mark their output, the detector\nneeds at least three seconds of clear speech to judge, and re-encoding\nor changing the speed of a clip degrades the mark. Treat a negative as\nthe absence of evidence rather than as evidence of absence.\n\nChecks are rate-limited well below the synthesis budget: this is a\nforensic question, not a data-plane call.","tags":["watermark"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The clip was checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkDetectionResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. the file\nupload cap, KB document upload cap, batch-call CSV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary","description":"The clip to check, at most 25MB. Give the detector at least\nthree seconds of clear speech; below that its confidence is\nnot worth acting on, and below half a second it always\nreports zero."}},"required":["audio"]}}}}}},"/v1/audio/watermark/verify":{"post":{"operationId":"watermark_verify","summary":"Verify Watermark","description":"The public AI detection tool. Ask whether a clip carries the watermark\nSpeechify seals into audio it generates, with no account, no API key and\nno credential of any kind.\n\n`verify` answers; `detect` measures. This route returns a bare yes or no,\nthe way verifying a signature does. Its sibling\n`POST /v1/audio/watermark/detect` takes an API key and returns the\ndetector's confidence alongside the verdict.\n\nThis is the programmatic half of the tool published at\n, and it exists so the tool can be invoked\nwithout visiting our website, as California's AI Transparency Act\n(BPC 22757.2) requires. Nothing about the clip is stored, and nothing\nidentifying about you is collected or retained.\n\nThe answer is a bare verdict. `watermarked: true` is positive evidence\nthat the audio came from Speechify synthesis. `watermarked: false` is\nNOT proof that it did not: only models redeployed since the watermark\nshipped mark their output, the detector needs at least three seconds of\nclear speech to judge, and re-encoding or changing the speed of a clip\ndegrades the mark. Treat a negative as the absence of evidence rather\nthan as evidence of absence.\n\nBecause the tool takes no credential, it is rate-limited per client\naddress and shares a platform-wide budget: expect a 429 under sustained\nautomated use, and retry after the interval the response advertises.\nUse `POST /v1/audio/watermark/detect` with an API key for the detector's\nconfidence score and a per-workspace allowance of its own.","tags":["watermark"],"parameters":[{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The clip was checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkVerificationResponse"}}}},"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/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. the file\nupload cap, KB document upload cap, batch-call CSV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary","description":"The clip to check, at most 25MB. Give the detector at least\nthree seconds of clear speech; below that its answer is not\nworth acting on."}},"required":["audio"]}}}}}},"/v1/agents":{"get":{"operationId":"agent_list","summary":"List Agents","description":"List voice agents owned by the caller. Cursor-paginated: omit\n`cursor` for the first page; walk pages while `has_more` is true\n(default page size 50, max 200).","tags":["agent"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"project_id","in":"query","description":"Filter by workspace project: omit for every project you can reach,\npass the literal `default` for resources in the implicit Default\nproject only, or a `proj_...` id for that project's resources.\nReturns 404 project_not_found for a malformed id and for any filter\noutside your reach: a project-pinned API key or service-account key\nreaches only its pinned project, and a member holding project grants\nreaches only the granted projects, so neither can name `default`.\nThat 404 is the same in every case and does not reveal whether such\na project exists - outside your reach a project is answered as\nnonexistent, never as forbidden. Inside it, a well-formed id that\nmatches no project yields an empty page.\n","required":false,"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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voice agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentsResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}},"post":{"operationId":"agent_create","summary":"Create Agent","description":"Create a voice agent.\n\nThe agent lands in the project named by `project_id`, or in the\nimplicit Default project when none is given. Each project holds at\nmost a fixed number of live agents; a create past that answers\n`409 agent_limit_reached` naming the ceiling, and deleting an agent\nin that project - or creating this one in another - frees a slot.\n","tags":["agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}}}},"/v1/agents/voices":{"get":{"operationId":"agent_listAgentVoices","summary":"List Agent Voices","description":"List the voice catalogue available for voice agents: the curated\nshared catalogue plus your workspace's own cloned voices, each\nmarked by `type` (`shared` or `personal`). The same slug set is\naccepted by POST/PATCH /v1/agents, so any voice listed here can be\nassigned to an agent. Cloned voices are workspace-owned only - a\npersonal voice scoped to an individual is not selectable on an\nagent, which is a workspace-shared resource. The JSON layout\nintentionally mirrors the TTS `/v1/voices` shape so a single voice\npicker can consume both endpoints.\n\nCursor-paginated: pass `cursor` + `limit` and walk pages while\n`has_more` is true. From API version `2026-08-07` an omitted `limit`\nreturns the first page (default 50, max 200); a caller pinned before\nthat date keeps the historical whole-catalogue response until it opts\nin. The shared catalogue is served first, then your cloned voices.\n","tags":["agent"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The curated agent voice catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentVoicesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tts-models":{"get":{"operationId":"agent_listTTSModels","summary":"List Agent TTS Models","description":"List the Simba text-to-speech models a voice agent can be pinned to\nwith `tts.model`.\n\nThe response is the whole catalog and is the same for every\nworkspace - which model serves an agent is a routing decision, not\nan entitlement, so nothing here is plan-gated. Whether a *particular*\nagent may select an entry depends on two facts this response\npublishes rather than resolving for you, because both change without\nthis list changing:\n\n- `english_only` - the model has no multilingual deployment, so an\n agent that declares `additional_languages` (or whose `language` is\n not English) cannot select it.\n- `requires_voice_curation` - deprecated and always false. No model\n asks a voice for a registration: every training conditions on the\n voice's own prompt audio, so every model is selectable on every\n voice we speak ourselves, cloned voices included.\n\nDrive a model picker from this and the agent's languages and it can\nonly offer combinations POST/PATCH /v1/agents will accept.\nReturns the full set in one response: bounded by the platform's\ncurated model catalog, so it is intentionally not paginated.\n","tags":["agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The TTS models selectable for voice agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTTSModelsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}":{"delete":{"operationId":"agent_delete","summary":"Delete Agent","description":"Delete an agent, and with it everything that belonged only to that\nagent.\n\n**Goes with the agent**, immediately unreadable through every\nendpoint: its runs and their step journals and approvals, its\nconversations and the transcripts, messages and recordings inside\nthem, what it learned about the people it spoke to, its triggers,\nshare links, channel bindings, team memberships and the batch\ncampaigns it dialled. A run that has not settled is asked to stop,\nincluding one parked waiting on a person or on a delegated child. These are removed for good 30 days\nlater; until then the delete can still be walked back by support.\n\n**Survives the agent**, because it belongs to the workspace rather\nthan to this agent: attached tools, knowledge bases, stores and\nskills (only the attachment is dropped), the agent's tests, phone\nnumbers, and the teams it belonged to.\n\n**Kept regardless**, because it is accounting rather than content:\nthe usage the workspace was billed for.\n\nRefused with `409 agent_in_use` while a live phone number still\nroutes to the agent, including the agent a webhook binding\nprovisioned for its number; `used_by` names the numbers. Unbind them\n(`DELETE /v1/agents/{agent_id}/phone-numbers/{phone_number_id}`,\nwhich also clears a webhook binding) and the delete proceeds.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Agent deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"A live phone number still routes to the agent. `used_by` names\nthem so the caller can unbind first.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInUseError"}}}}}},"get":{"operationId":"agent_get","summary":"Get Agent","description":"Retrieve a voice agent by ID.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}},"patch":{"operationId":"agent_update","summary":"Update Agent","description":"Update a voice agent. Only fields present on the request body are changed.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}}}},"/v1/agents/{agent_id}/widget-config":{"get":{"operationId":"agent_getWidgetConfig","summary":"Get Agent Widget Config","description":"Return the embed-widget appearance config for an agent. Works\nunauthenticated for public agents; the body is cosmetic only.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's widget configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConfig"}}}},"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/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/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/Error"}}}}}}},"/v1/agents/flow/schema":{"get":{"operationId":"flow_getSchema","summary":"Get Flow Graph Schema","description":"Return the JSON Schema describing the flow graph node taxonomy.\nUnauthenticated; flow editors fetch it to validate graphs client-side.\n","tags":["flow"],"parameters":[{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A JSON Schema document for the flow graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_flow_getSchema_Response_200"}}}},"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/Error"}}}}}}},"/v1/agents/{agent_id}/flow":{"get":{"operationId":"flow_getFlow","summary":"Get Agent Flow","description":"Return the agent's flow graph: the current draft (if any), the\nactive published graph (if any), and the version history.\n","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The draft graph, active graph, and version history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFlowResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}},"put":{"operationId":"flow_updateFlow","summary":"Update Agent Flow Draft","description":"Replace the agent's draft flow graph. The graph is validated\nbefore it is stored; publish it separately to make it active.\n","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The stored draft graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowGraph"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutFlowRequest"}}}}}},"/v1/agents/{agent_id}/flow/publish":{"post":{"operationId":"flow_publish","summary":"Publish Agent Flow","description":"Publish the agent's draft graph as a new active flow version.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The newly published flow version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersion"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The behavioral-eval publish gate refused the publish, on one of two\ncodes the caller can FIX (neither is waited out):\n\n- `agent_publish_gate_failed`: the agent's configured suite did not\n pass. `error.details` carries the verdict (per-case, per-criterion).\n- `agent_publish_gate_tool_unreachable`: the checks never ran because\n a tool the agent is attached to could not be reached. Nothing was\n judged, and no retry helps while the endpoint is down;\n `error.message` names the tool, the endpoint and the reason.\n\nThe one publish failure that IS waited out is the `503`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"503":{"description":"The publish checks could not run (`agent_publish_gate_unavailable`):\nthe eval worker, the judge or the probe corpus errored, so nothing\nabout the agent was judged. This is OURS, and the only publish failure\na caller waits out: not a verdict on the configuration, retry after\n`Retry-After`. `error.details` lists the cases that could not run. A\ncheck that could not run because of the agent's own configuration is\nthe `422 agent_publish_gate_tool_unreachable` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishFlowRequest"}}}}}},"/v1/agents/{agent_id}/flow/rollback":{"post":{"operationId":"flow_rollback","summary":"Roll Back Agent Flow","description":"Publish a prior flow version as the active graph.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The flow version that is now active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersion"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"422":{"description":"The behavioral-eval publish gate refused the rollback, on one of two\ncodes the caller can FIX (neither is waited out):\n\n- `agent_publish_gate_failed`: the target version did not pass the\n agent's configured suite. `error.details` carries the verdict.\n- `agent_publish_gate_tool_unreachable`: the checks never ran because\n a tool the agent is attached to could not be reached;\n `error.message` names the tool, the endpoint and the reason.\n\nThe one rollback failure that IS waited out is the `503`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"503":{"description":"The gate's checks could not run on the rollback target\n(`agent_publish_gate_unavailable`): the eval worker, the judge or\nthe probe corpus errored, so nothing about the version was judged.\nThis is OURS, and the only rollback failure a caller waits out: not a\nverdict on it, retry after `Retry-After`. `error.details` lists the\ncases that could not run. A check that could not run because of the\nagent's own configuration is the `422\nagent_publish_gate_tool_unreachable` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackFlowRequest"}}}}}},"/v1/agents/{agent_id}/flow/deactivate":{"post":{"operationId":"flow_deactivate","summary":"Deactivate Agent Flow","description":"Deactivate the agent's published flow so the agent runs the synthesized default flow.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Flow deactivated.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}}},"/v1/agents/{agent_id}/flow/draft":{"delete":{"operationId":"flow_discardDraft","summary":"Discard Agent Flow Draft","description":"Discard the agent's unpublished draft flow graph.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Draft discarded.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}}},"/v1/agents/{agent_id}/flow/versions":{"get":{"operationId":"flow_listVersions","summary":"List Agent Flow Versions","description":"List every published flow version for the agent, newest first.\nCursor-paginated: omit `cursor` for the first page; walk pages\nwhile `has_more` is true (default page size 50, max 200).","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's flow version history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFlowVersionsResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}}},"/v1/agents/{agent_id}/flow/versions/{version_id}":{"get":{"operationId":"flow_getVersion","summary":"Get Agent Flow Version","description":"Return the full flow graph for a specific published version.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","description":"Prefixed flow version id (`fver_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested flow version's graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowGraph"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}}},"/v1/agents/flow/templates":{"get":{"operationId":"flow_listTemplates","summary":"List Flow Templates","description":"List the reusable flow templates available to the workspace.\nCursor-paginated: omit `cursor` for the first page; walk pages\nwhile `has_more` is true (default page size 50, max 200).","tags":["flow"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The available flow templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFlowTemplatesResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}},"post":{"operationId":"flow_createTemplate","summary":"Create Flow Template","description":"Create a reusable flow template from a graph.","tags":["flow"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created flow template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplate"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowTemplateRequest"}}}}}},"/v1/agents/flow/templates/{flow_template_id}":{"get":{"operationId":"flow_getTemplate","summary":"Get Flow Template","description":"Retrieve a flow template by id.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested flow template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplate"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}},"put":{"operationId":"flow_updateTemplate","summary":"Update Flow Template","description":"Replace a flow template. The whole template is replaced, not patched field-by-field.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated flow template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplate"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowTemplateRequest"}}}}},"delete":{"operationId":"flow_deleteTemplate","summary":"Delete Flow Template","description":"Delete a flow template.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Template deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/Error"}}}}}}},"/v1/agents/flow/templates/{flow_template_id}/clone":{"post":{"operationId":"flow_cloneTemplate","summary":"Clone Flow Template","description":"Clone a flow template onto an agent as a new draft graph.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's new draft graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowGraph"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneFlowTemplateRequest"}}}}}},"/v1/agents/{agent_id}/evaluation-config":{"get":{"operationId":"agent_getEvaluationConfig","summary":"Get Evaluation Config","description":"Retrieve the agent's post-call evaluation criteria + data-collection config.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The evaluation config for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationConfig"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"agent_updateEvaluationConfig","summary":"Update Evaluation Config","description":"Replace the agent's evaluation criteria + data-collection fields.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated evaluation config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationConfig"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvaluationConfigRequest"}}}}}},"/v1/agents/{agent_id}/variables":{"get":{"operationId":"agent_getDynamicVariables","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":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDynamicVariablesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}},"put":{"operationId":"agent_updateDynamicVariables","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":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDynamicVariablesResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDynamicVariablesRequest"}}}}}},"/v1/agents/{agent_id}/conversations":{"post":{"operationId":"agent_createConversation","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\nPass `user_identity` as the stable caller key your application uses\nfor memory and caller correlation. It is kept separate from the\nopaque, per-session realtime participant identity.\n\n`overrides.voice_id` replaces the configured voice for the entire\nconversation, including every configured language the voice can\nserve. The request is rejected when the voice is unavailable or\ncannot cover the agent's configured language set; the rejection\nnames `overrides.voice_id` in the error envelope's `fields` map.\nThe override belongs to this conversation only: if the call is\ntransferred to another agent mid-conversation, that agent speaks\nwith its own configured voice.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"The created conversation with its realtime session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationRequest"}}}}}},"/v1/agents/{agent_id}/sessions":{"post":{"operationId":"agent_createSession","summary":"Create Session","description":"Mint a realtime voice session for the given agent. Widget-friendly\ncounterpart to `createConversation` \u2014 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\n`Idempotency-Key` replay is scoped to the authenticated caller, so it\napplies to Bearer requests only: an unauthenticated mint has no scope\nto replay under, and retrying one mints a fresh session.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"The created session with its realtime token + URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/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/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/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}}}},"/v1/agents/conversations":{"get":{"operationId":"conversations_list","summary":"List Conversations","description":"List conversations owned by the caller, ordered by most recent.\nCursor-paginated: omit `cursor` to fetch the first page; pass the\nprevious response's `next_cursor` back to fetch the next page.\nWalk pages while `has_more` is true.\n\n`project_id` matches the project the call was DISPATCHED under, which\nis frozen when the conversation starts. Moving an agent to another\nproject therefore leaves its past calls attributed where they ran, the\nsame way per-project usage reports them.","tags":["conversations"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"agent_id","in":"query","description":"Filter to conversations for this agent.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by conversation status.","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"name":"transport","in":"query","description":"Filter by the runtime that carried the conversation. `phone`\nmatches calls in either direction.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"name":"channel","in":"query","description":"Filter by the front door the conversation arrived through.\nThis is the axis that separates two conversations sharing one\ntransport: `channel=slack` and `channel=text` both run the\n`text` transport. Combining it with `transport` narrows by\nboth.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationChannel"}},{"name":"live","in":"query","description":"Narrow to (`true`) or away from (`false`) the conversations that\nare a realtime session in progress: non-terminal AND holding a\nroom. A text or Slack thread holds no room, so it is open rather\nthan live however long it stays non-terminal - `status=active`\nalone matches it. This is the filter a live view asks for.\n","required":false,"schema":{"type":"boolean"}},{"name":"caller_identity","in":"query","description":"Filter by caller identity.","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","description":"Narrow to one person's conversations, whichever agent or channel\nreached them. Prefixed `contact_...` id.\n","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Free-text search across conversation content.","required":false,"schema":{"type":"string"}},{"name":"started_after","in":"query","description":"Only conversations started at or after this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","description":"Only conversations started at or before this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"duration_min_ms","in":"query","description":"Minimum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"duration_max_ms","in":"query","description":"Maximum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"project_id","in":"query","description":"Filter by workspace project: omit for every project you can reach,\npass the literal `default` for resources in the implicit Default\nproject only, or a `proj_...` id for that project's resources.\nReturns 404 project_not_found for a malformed id and for any filter\noutside your reach: a project-pinned API key or service-account key\nreaches only its pinned project, and a member holding project grants\nreaches only the granted projects, so neither can name `default`.\nThat 404 is the same in every case and does not reveal whether such\na project exists - outside your reach a project is answered as\nnonexistent, never as forbidden. Inside it, a well-formed id that\nmatches no project yields an empty page.\n","required":false,"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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConversationsResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}}},"/v1/agents/conversations/{conversation_id}":{"get":{"operationId":"conversations_get","summary":"Get Conversation","description":"Retrieve a conversation by ID.","tags":["conversations"],"parameters":[{"name":"conversation_id","in":"path","description":"Conversation id (prefixed external id, `conv_...`).","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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}}},"/v1/agents/conversations/recent-callees":{"get":{"operationId":"conversations_recent_callees","summary":"List recent callees","description":"Distinct phone numbers the caller's workspace has dialled on\noutbound calls, ordered by most recent. Feeds the batch-calls\ncomposer's \"Suggested from history\" surface. Cursor-paginated:\nomit `cursor` to fetch the first page. Default page size is 50\nand max is 200. Walk pages while `has_more` is true.\n","tags":["conversations"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recent callees for the caller's workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRecentCalleesResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/stats":{"get":{"operationId":"conversations_stats","summary":"Conversation stats","description":"Aggregated counts and averages over the caller's conversations, scoped\nby the same filters as the list endpoint, `project_id` included.","tags":["conversations"],"parameters":[{"name":"agent_id","in":"query","description":"Filter to conversations for this agent.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by conversation status.","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"name":"transport","in":"query","description":"Filter by the runtime that carried the conversation. `phone`\nmatches calls in either direction.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"name":"channel","in":"query","description":"Filter by the front door the conversation arrived through.\nThis is the axis that separates two conversations sharing one\ntransport: `channel=slack` and `channel=text` both run the\n`text` transport. Combining it with `transport` narrows by\nboth.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationChannel"}},{"name":"live","in":"query","description":"Narrow to (`true`) or away from (`false`) the conversations that\nare a realtime session in progress: non-terminal AND holding a\nroom. A text or Slack thread holds no room, so it is open rather\nthan live however long it stays non-terminal - `status=active`\nalone matches it. This is the filter a live view asks for.\n","required":false,"schema":{"type":"boolean"}},{"name":"caller_identity","in":"query","description":"Filter by caller identity.","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","description":"Narrow to one person's conversations, whichever agent or channel\nreached them. Prefixed `contact_...` id.\n","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Free-text search across conversation content.","required":false,"schema":{"type":"string"}},{"name":"started_after","in":"query","description":"Only conversations started at or after this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","description":"Only conversations started at or before this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"duration_min_ms","in":"query","description":"Minimum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"duration_max_ms","in":"query","description":"Maximum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"project_id","in":"query","description":"Filter by workspace project: omit for every project you can reach,\npass the literal `default` for resources in the implicit Default\nproject only, or a `proj_...` id for that project's resources.\nReturns 404 project_not_found for a malformed id and for any filter\noutside your reach: a project-pinned API key or service-account key\nreaches only its pinned project, and a member holding project grants\nreaches only the granted projects, so neither can name `default`.\nThat 404 is the same in every case and does not reveal whether such\na project exists - outside your reach a project is answered as\nnonexistent, never as forbidden. Inside it, a well-formed id that\nmatches no project yields an empty page.\n","required":false,"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"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stats for the matched conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStats"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}}},"/v1/agents/conversations/{conversation_id}/messages":{"get":{"operationId":"conversations_listMessages","summary":"List Messages","description":"Retrieve the transcript for a conversation in started_at order\n(oldest first). Cursor-paginated: omit `cursor` to fetch the\nfirst page. Default page size is 50 and max is 200. Walk pages\nwhile `has_more` is true.","tags":["conversations"],"parameters":[{"name":"conversation_id","in":"path","description":"Conversation id (prefixed external id, `conv_...`).","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The messages for the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMessagesResponse"}}}},"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/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/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/Error"}}}}}}},"/v1/agents/conversations/{conversation_id}/recording":{"get":{"operationId":"conversations_streamRecording","summary":"Stream Recording","description":"Proxy the GCS-stored audio recording for a conversation through\nthe Cloud Run service identity. Returns OGG/Opus bytes (LiveKit\nroom-composite egress default). The response is streamed so a\nlong recording does not buffer in memory; `