diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.CreateSpeechUnderstandingResponse200.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.CreateSpeechUnderstandingResponse200.g.cs index 70ad874..1e4251c 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.CreateSpeechUnderstandingResponse200.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.CreateSpeechUnderstandingResponse200.g.cs @@ -114,6 +114,7 @@ public class CreateSpeechUnderstandingResponse200JsonConverter : global::System. { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.LLMGatewayTranslationResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LLMGatewayTranslationResponse).Name}"); lLMGatewayTranslationResponse = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -124,9 +125,13 @@ public class CreateSpeechUnderstandingResponse200JsonConverter : global::System. catch (global::System.InvalidOperationException) { } + } + if (lLMGatewayTranslationResponse == null && lLMGatewaySpeakerIdentificationResponse == null && lLMGatewayCustomFormattingResponse == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse).Name}"); lLMGatewaySpeakerIdentificationResponse = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -137,9 +142,13 @@ public class CreateSpeechUnderstandingResponse200JsonConverter : global::System. catch (global::System.InvalidOperationException) { } + } + if (lLMGatewayTranslationResponse == null && lLMGatewaySpeakerIdentificationResponse == null && lLMGatewayCustomFormattingResponse == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.LLMGatewayCustomFormattingResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LLMGatewayCustomFormattingResponse).Name}"); lLMGatewayCustomFormattingResponse = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.Message.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.Message.g.cs index 1d2a705..26dbc37 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.Message.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.Message.g.cs @@ -122,6 +122,7 @@ public class MessageJsonConverter : global::System.Text.Json.Serialization.JsonC { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.MessageVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.MessageVariant1).Name}"); messageVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -132,9 +133,13 @@ public class MessageJsonConverter : global::System.Text.Json.Serialization.JsonC catch (global::System.InvalidOperationException) { } + } + if (messageVariant1 == null && messageVariant2 == null && messageVariant3 == null && tool == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.MessageVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.MessageVariant2).Name}"); messageVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -145,9 +150,13 @@ public class MessageJsonConverter : global::System.Text.Json.Serialization.JsonC catch (global::System.InvalidOperationException) { } + } + if (messageVariant1 == null && messageVariant2 == null && messageVariant3 == null && tool == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.MessageVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.MessageVariant3).Name}"); messageVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -158,9 +167,13 @@ public class MessageJsonConverter : global::System.Text.Json.Serialization.JsonC catch (global::System.InvalidOperationException) { } + } + if (messageVariant1 == null && messageVariant2 == null && messageVariant3 == null && tool == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.MessageVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.MessageVariant4).Name}"); tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.MessageDiscriminatorRole.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.MessageDiscriminatorRole.g.cs new file mode 100644 index 0000000..e664b4f --- /dev/null +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.MessageDiscriminatorRole.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AssemblyAI.JsonConverters +{ + /// + public sealed class MessageDiscriminatorRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AssemblyAI.MessageDiscriminatorRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AssemblyAI.MessageDiscriminatorRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AssemblyAI.MessageDiscriminatorRole)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AssemblyAI.MessageDiscriminatorRole); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AssemblyAI.MessageDiscriminatorRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AssemblyAI.MessageDiscriminatorRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.MessageDiscriminatorRoleNullable.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.MessageDiscriminatorRoleNullable.g.cs new file mode 100644 index 0000000..3f39add --- /dev/null +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.MessageDiscriminatorRoleNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AssemblyAI.JsonConverters +{ + /// + public sealed class MessageDiscriminatorRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AssemblyAI.MessageDiscriminatorRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AssemblyAI.MessageDiscriminatorRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AssemblyAI.MessageDiscriminatorRole)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AssemblyAI.MessageDiscriminatorRole?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AssemblyAI.MessageDiscriminatorRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::AssemblyAI.MessageDiscriminatorRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.OneOf2.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.OneOf2.g.cs index 1308c45..aa80138 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.OneOf2.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.OneOf2.g.cs @@ -107,7 +107,10 @@ public class OneOfJsonConverter : global::System.Text.Json.Serialization catch (global::System.InvalidOperationException) { } + } + if (value1 == null && value2 == null) + { try { diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.ToolChoice.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.ToolChoice.g.cs index 68b64e0..9f0a7fe 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.ToolChoice.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.ToolChoice.g.cs @@ -84,6 +84,7 @@ public class ToolChoiceJsonConverter : global::System.Text.Json.Serialization.Js { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.ToolChoice0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.ToolChoice0).Name}"); toolChoice0 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -94,9 +95,13 @@ public class ToolChoiceJsonConverter : global::System.Text.Json.Serialization.Js catch (global::System.InvalidOperationException) { } + } + if (toolChoice0 == null && toolChoice1 == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.ToolChoice1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.ToolChoice1).Name}"); toolChoice1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs index 3f33e7b..82138c1 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs @@ -111,6 +111,7 @@ public class TranscriptOptionalParamsSpeechUnderstandingRequestJsonConverter : g { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranslationRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranslationRequestBody).Name}"); translationRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -121,9 +122,13 @@ public class TranscriptOptionalParamsSpeechUnderstandingRequestJsonConverter : g catch (global::System.InvalidOperationException) { } + } + if (translationRequestBody == null && speakerIdentificationRequestBody == null && customFormattingRequestBody == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.SpeakerIdentificationRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.SpeakerIdentificationRequestBody).Name}"); speakerIdentificationRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -134,9 +139,13 @@ public class TranscriptOptionalParamsSpeechUnderstandingRequestJsonConverter : g catch (global::System.InvalidOperationException) { } + } + if (translationRequestBody == null && speakerIdentificationRequestBody == null && customFormattingRequestBody == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.CustomFormattingRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.CustomFormattingRequestBody).Name}"); customFormattingRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingRequest.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingRequest.g.cs index df684a7..c721cc7 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingRequest.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingRequest.g.cs @@ -111,6 +111,7 @@ public class TranscriptSpeechUnderstandingRequestJsonConverter : global::System. { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranslationRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranslationRequestBody).Name}"); translationRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -121,9 +122,13 @@ public class TranscriptSpeechUnderstandingRequestJsonConverter : global::System. catch (global::System.InvalidOperationException) { } + } + if (translationRequestBody == null && speakerIdentificationRequestBody == null && customFormattingRequestBody == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.SpeakerIdentificationRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.SpeakerIdentificationRequestBody).Name}"); speakerIdentificationRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -134,9 +139,13 @@ public class TranscriptSpeechUnderstandingRequestJsonConverter : global::System. catch (global::System.InvalidOperationException) { } + } + if (translationRequestBody == null && speakerIdentificationRequestBody == null && customFormattingRequestBody == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.CustomFormattingRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.CustomFormattingRequestBody).Name}"); customFormattingRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingResponse.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingResponse.g.cs index 05fdc5b..df76c2e 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingResponse.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptSpeechUnderstandingResponse.g.cs @@ -107,6 +107,7 @@ public class TranscriptSpeechUnderstandingResponseJsonConverter : global::System { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranslationResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranslationResponse).Name}"); translationResponse = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -117,9 +118,13 @@ public class TranscriptSpeechUnderstandingResponseJsonConverter : global::System catch (global::System.InvalidOperationException) { } + } + if (translationResponse == null && speakerIdentificationResponse == null && customFormattingResponse == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.SpeakerIdentificationResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.SpeakerIdentificationResponse).Name}"); speakerIdentificationResponse = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -130,9 +135,13 @@ public class TranscriptSpeechUnderstandingResponseJsonConverter : global::System catch (global::System.InvalidOperationException) { } + } + if (translationResponse == null && speakerIdentificationResponse == null && customFormattingResponse == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.CustomFormattingResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.CustomFormattingResponse).Name}"); customFormattingResponse = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UnderstandingRequestSpeechUnderstandingRequest.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UnderstandingRequestSpeechUnderstandingRequest.g.cs index bcfe465..7eae6fa 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UnderstandingRequestSpeechUnderstandingRequest.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UnderstandingRequestSpeechUnderstandingRequest.g.cs @@ -111,6 +111,7 @@ public class UnderstandingRequestSpeechUnderstandingRequestJsonConverter : globa { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranslationRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranslationRequestBody).Name}"); translationRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -121,9 +122,13 @@ public class UnderstandingRequestSpeechUnderstandingRequestJsonConverter : globa catch (global::System.InvalidOperationException) { } + } + if (translationRequestBody == null && speakerIdentificationRequestBody == null && customFormattingRequestBody == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.SpeakerIdentificationRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.SpeakerIdentificationRequestBody).Name}"); speakerIdentificationRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); @@ -134,9 +139,13 @@ public class UnderstandingRequestSpeechUnderstandingRequestJsonConverter : globa catch (global::System.InvalidOperationException) { } + } + if (translationRequestBody == null && speakerIdentificationRequestBody == null && customFormattingRequestBody == null) + { try { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.CustomFormattingRequestBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.CustomFormattingRequestBody).Name}"); customFormattingRequestBody = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UserAssistantSystemMessageContent.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UserAssistantSystemMessageContent.g.cs index 855e24d..69077c9 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UserAssistantSystemMessageContent.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.UserAssistantSystemMessageContent.g.cs @@ -108,7 +108,10 @@ public class UserAssistantSystemMessageContentJsonConverter : global::System.Tex catch (global::System.InvalidOperationException) { } + } + if (userAssistantSystemMessageContentVariant1 == null && userAssistantSystemMessageContent1 == null) + { try { diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs index d25f636..5d660c6 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs @@ -89,6 +89,10 @@ namespace AssemblyAI typeof(global::AssemblyAI.JsonConverters.ToolMessageRoleNullableJsonConverter), + typeof(global::AssemblyAI.JsonConverters.MessageDiscriminatorRoleJsonConverter), + + typeof(global::AssemblyAI.JsonConverters.MessageDiscriminatorRoleNullableJsonConverter), + typeof(global::AssemblyAI.JsonConverters.ToolTypeJsonConverter), typeof(global::AssemblyAI.JsonConverters.ToolTypeNullableJsonConverter), @@ -276,6 +280,7 @@ namespace AssemblyAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.MessageVariant3))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.MessageVariant4))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.MessageDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.MessageDiscriminatorRole), TypeInfoPropertyName = "MessageDiscriminatorRole2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.ToolType), TypeInfoPropertyName = "ToolType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.FunctionDescription))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.Tool))] diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs index 6508598..e66d4d1 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs @@ -524,251 +524,255 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::AssemblyAI.ToolType? Type124 { get; set; } + public global::AssemblyAI.MessageDiscriminatorRole? Type124 { get; set; } /// /// /// - public global::AssemblyAI.FunctionDescription? Type125 { get; set; } + public global::AssemblyAI.ToolType? Type125 { get; set; } /// /// /// - public global::AssemblyAI.Tool? Type126 { get; set; } + public global::AssemblyAI.FunctionDescription? Type126 { get; set; } /// /// /// - public global::AssemblyAI.ToolChoice0? Type127 { get; set; } + public global::AssemblyAI.Tool? Type127 { get; set; } /// /// /// - public global::AssemblyAI.ToolChoiceOneOf1Type? Type128 { get; set; } + public global::AssemblyAI.ToolChoice0? Type128 { get; set; } /// /// /// - public global::AssemblyAI.ToolChoiceOneOf1Function? Type129 { get; set; } + public global::AssemblyAI.ToolChoiceOneOf1Type? Type129 { get; set; } /// /// /// - public global::AssemblyAI.ToolChoice1? Type130 { get; set; } + public global::AssemblyAI.ToolChoiceOneOf1Function? Type130 { get; set; } /// /// /// - public global::AssemblyAI.ToolChoice? Type131 { get; set; } + public global::AssemblyAI.ToolChoice1? Type131 { get; set; } /// /// /// - public global::AssemblyAI.ResponseFormatType? Type132 { get; set; } + public global::AssemblyAI.ToolChoice? Type132 { get; set; } /// /// /// - public global::AssemblyAI.JsonSchemaConfig? Type133 { get; set; } + public global::AssemblyAI.ResponseFormatType? Type133 { get; set; } /// /// /// - public global::AssemblyAI.ResponseFormat? Type134 { get; set; } + public global::AssemblyAI.JsonSchemaConfig? Type134 { get; set; } /// /// /// - public global::AssemblyAI.FallbackObject? Type135 { get; set; } + public global::AssemblyAI.ResponseFormat? Type135 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type136 { get; set; } + public global::AssemblyAI.FallbackObject? Type136 { get; set; } /// /// /// - public global::AssemblyAI.FallbackConfig? Type137 { get; set; } + public global::System.Collections.Generic.IList? Type137 { get; set; } /// /// /// - public global::AssemblyAI.PostProcessingStepType? Type138 { get; set; } + public global::AssemblyAI.FallbackConfig? Type138 { get; set; } /// /// /// - public global::AssemblyAI.PostProcessingStep? Type139 { get; set; } + public global::AssemblyAI.PostProcessingStepType? Type139 { get; set; } /// /// /// - public global::AssemblyAI.LLMGatewayRequest? Type140 { get; set; } + public global::AssemblyAI.PostProcessingStep? Type140 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type141 { get; set; } + public global::AssemblyAI.LLMGatewayRequest? Type141 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type142 { get; set; } + public global::System.Collections.Generic.IList? Type142 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type143 { get; set; } + public global::System.Collections.Generic.IList? Type143 { get; set; } /// /// /// - public global::AssemblyAI.ResponseMessage? Type144 { get; set; } + public global::System.Collections.Generic.IList? Type144 { get; set; } /// /// /// - public global::AssemblyAI.FunctionToolCallType? Type145 { get; set; } + public global::AssemblyAI.ResponseMessage? Type145 { get; set; } /// /// /// - public global::AssemblyAI.FunctionCall? Type146 { get; set; } + public global::AssemblyAI.FunctionToolCallType? Type146 { get; set; } /// /// /// - public global::AssemblyAI.FunctionToolCall? Type147 { get; set; } + public global::AssemblyAI.FunctionCall? Type147 { get; set; } /// /// /// - public global::AssemblyAI.Choice? Type148 { get; set; } + public global::AssemblyAI.FunctionToolCall? Type148 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type149 { get; set; } + public global::AssemblyAI.Choice? Type149 { get; set; } /// /// /// - public global::AssemblyAI.ResponseRequest? Type150 { get; set; } + public global::System.Collections.Generic.IList? Type150 { get; set; } /// /// /// - public global::AssemblyAI.Usage? Type151 { get; set; } + public global::AssemblyAI.ResponseRequest? Type151 { get; set; } /// /// /// - public global::AssemblyAI.Response? Type152 { get; set; } + public global::AssemblyAI.Usage? Type152 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type153 { get; set; } + public global::AssemblyAI.Response? Type153 { get; set; } /// /// /// - public long? Type154 { get; set; } + public global::System.Collections.Generic.IList? Type154 { get; set; } /// /// /// - public global::AssemblyAI.UnderstandingRequestSpeechUnderstandingRequest? Type155 { get; set; } + public long? Type155 { get; set; } /// /// /// - public global::AssemblyAI.UnderstandingRequestSpeechUnderstanding? Type156 { get; set; } + public global::AssemblyAI.UnderstandingRequestSpeechUnderstandingRequest? Type156 { get; set; } /// /// /// - public global::AssemblyAI.UnderstandingRequest? Type157 { get; set; } + public global::AssemblyAI.UnderstandingRequestSpeechUnderstanding? Type157 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayTranslationResponseSpeechUnderstandingResponseTranslation? Type158 { get; set; } + public global::AssemblyAI.UnderstandingRequest? Type158 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayTranslationResponseSpeechUnderstandingResponse? Type159 { get; set; } + public global::AssemblyAI.LlmGatewayTranslationResponseSpeechUnderstandingResponseTranslation? Type159 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayTranslationResponseSpeechUnderstanding? Type160 { get; set; } + public global::AssemblyAI.LlmGatewayTranslationResponseSpeechUnderstandingResponse? Type160 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayTranslationResponseUtterancesItems? Type161 { get; set; } + public global::AssemblyAI.LlmGatewayTranslationResponseSpeechUnderstanding? Type161 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayTranslationResponseWordsItems? Type162 { get; set; } + public global::AssemblyAI.LlmGatewayTranslationResponseUtterancesItems? Type162 { get; set; } /// /// /// - public global::AssemblyAI.LLMGatewayTranslationResponse? Type163 { get; set; } + public global::AssemblyAI.LlmGatewayTranslationResponseWordsItems? Type163 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type164 { get; set; } + public global::AssemblyAI.LLMGatewayTranslationResponse? Type164 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type165 { get; set; } + public global::System.Collections.Generic.IList? Type165 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseSpeechUnderstandingResponseSpeakerIdentification? Type166 { get; set; } + public global::System.Collections.Generic.IList? Type166 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseSpeechUnderstandingResponse? Type167 { get; set; } + public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseSpeechUnderstandingResponseSpeakerIdentification? Type167 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseSpeechUnderstanding? Type168 { get; set; } + public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseSpeechUnderstandingResponse? Type168 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseUtterancesItems? Type169 { get; set; } + public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseSpeechUnderstanding? Type169 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseWordsItems? Type170 { get; set; } + public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseUtterancesItems? Type170 { get; set; } /// /// /// - public global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse? Type171 { get; set; } + public global::AssemblyAI.LlmGatewaySpeakerIdentificationResponseWordsItems? Type171 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type172 { get; set; } + public global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse? Type172 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type173 { get; set; } + public global::System.Collections.Generic.IList? Type173 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstandingResponseCustomFormattingFormattedUtterancesItems? Type174 { get; set; } + public global::System.Collections.Generic.IList? Type174 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstandingResponseCustomFormatting? Type175 { get; set; } + public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstandingResponseCustomFormattingFormattedUtterancesItems? Type175 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type176 { get; set; } + public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstandingResponseCustomFormatting? Type176 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstandingResponse? Type177 { get; set; } + public global::System.Collections.Generic.IList? Type177 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstanding? Type178 { get; set; } + public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstandingResponse? Type178 { get; set; } /// /// /// - public global::AssemblyAI.LlmGatewayCustomFormattingResponseUtterancesItems? Type179 { get; set; } + public global::AssemblyAI.LlmGatewayCustomFormattingResponseSpeechUnderstanding? Type179 { get; set; } /// /// /// - public global::AssemblyAI.LLMGatewayCustomFormattingResponse? Type180 { get; set; } + public global::AssemblyAI.LlmGatewayCustomFormattingResponseUtterancesItems? Type180 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type181 { get; set; } + public global::AssemblyAI.LLMGatewayCustomFormattingResponse? Type181 { get; set; } /// /// /// - public global::AssemblyAI.CreateSpeechUnderstandingResponse200? Type182 { get; set; } + public global::System.Collections.Generic.IList? Type182 { get; set; } /// /// /// - public global::AssemblyAI.StreamingAPIGenerateStreamingTokenResponse200? Type183 { get; set; } + public global::AssemblyAI.CreateSpeechUnderstandingResponse200? Type183 { get; set; } /// /// /// - public global::AssemblyAI.VoiceAgentAPIGenerateVoiceAgentTokenResponse200? Type184 { get; set; } + public global::AssemblyAI.StreamingAPIGenerateStreamingTokenResponse200? Type184 { get; set; } /// /// /// - public byte[]? Type185 { get; set; } + public global::AssemblyAI.VoiceAgentAPIGenerateVoiceAgentTokenResponse200? Type185 { get; set; } + /// + /// + /// + public byte[]? Type186 { get; set; } /// /// diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminator.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminator.g.cs index 9c093f2..0edcacd 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminator.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminator.g.cs @@ -12,7 +12,8 @@ public sealed partial class MessageDiscriminator /// /// [global::System.Text.Json.Serialization.JsonPropertyName("role")] - public string? Role { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.MessageDiscriminatorRoleJsonConverter))] + public global::AssemblyAI.MessageDiscriminatorRole? Role { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,7 +29,7 @@ public sealed partial class MessageDiscriminator [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public MessageDiscriminator( - string? role) + global::AssemblyAI.MessageDiscriminatorRole? role) { this.Role = role; } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminatorRole.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminatorRole.g.cs new file mode 100644 index 0000000..b21fd70 --- /dev/null +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.MessageDiscriminatorRole.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace AssemblyAI +{ + /// + /// + /// + public enum MessageDiscriminatorRole + { + /// + /// + /// + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageDiscriminatorRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageDiscriminatorRole value) + { + return value switch + { + MessageDiscriminatorRole.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageDiscriminatorRole? ToEnum(string value) + { + return value switch + { + "tool" => MessageDiscriminatorRole.Tool, + _ => null, + }; + } + } +} \ No newline at end of file