diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs index 40a56c5e..d1eafeb6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageVideoGenerationClient.CreateVideos.g.cs @@ -50,7 +50,7 @@ public partial interface ISubpackageVideoGenerationClient /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// /// - /// Reference images to guide video generation + /// Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest. /// /// /// @@ -77,7 +77,7 @@ public partial interface ISubpackageVideoGenerationClient int? duration = default, global::System.Collections.Generic.IList? frameImages = default, bool? generateAudio = default, - global::System.Collections.Generic.IList? inputReferences = default, + global::System.Collections.Generic.IList? inputReferences = default, global::OpenRouter.VideoGenerationRequestProvider? provider = default, global::OpenRouter.VideoGenerationRequestResolution? resolution = default, int? seed = default, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs new file mode 100644 index 00000000..42b19a82 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenRouter.JsonConverters +{ + /// + public class InputReferenceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReference Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenRouter.InputReferenceDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenRouter.InputReferenceVariant1? audioUrl = default; + if (discriminator?.Type == global::OpenRouter.InputReferenceDiscriminatorType.AudioUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenRouter.InputReferenceVariant1)}"); + audioUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenRouter.InputReferenceVariant2? imageUrl = default; + if (discriminator?.Type == global::OpenRouter.InputReferenceDiscriminatorType.ImageUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenRouter.InputReferenceVariant2)}"); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenRouter.InputReferenceVariant3? videoUrl = default; + if (discriminator?.Type == global::OpenRouter.InputReferenceDiscriminatorType.VideoUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenRouter.InputReferenceVariant3)}"); + videoUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::OpenRouter.InputReference( + discriminator?.Type, + audioUrl, + + imageUrl, + + videoUrl + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReference value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAudioUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputReferenceVariant1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); + } + else if (value.IsImageUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputReferenceVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); + } + else if (value.IsVideoUrl) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputReferenceVariant3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceDiscriminatorType.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceDiscriminatorType.g.cs new file mode 100644 index 00000000..c3ea619a --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class InputReferenceDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReferenceDiscriminatorType 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::OpenRouter.InputReferenceDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.InputReferenceDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.InputReferenceDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReferenceDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenRouter.InputReferenceDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullable.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..1edfbcd6 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class InputReferenceDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReferenceDiscriminatorType? 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::OpenRouter.InputReferenceDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.InputReferenceDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.InputReferenceDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReferenceDiscriminatorType? 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::OpenRouter.InputReferenceDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ContentPartImageType.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant1Type.g.cs similarity index 66% rename from src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ContentPartImageType.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant1Type.g.cs index 09b39010..7f8bce25 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ContentPartImageType.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant1Type.g.cs @@ -3,10 +3,10 @@ namespace OpenRouter.JsonConverters { /// - public sealed class ContentPartImageTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class InputReferenceVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenRouter.ContentPartImageType Read( + public override global::OpenRouter.InputReferenceVariant1Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ContentPartImageTypeJsonConverter : global::System.Text.Json var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenRouter.ContentPartImageTypeExtensions.ToEnum(stringValue) ?? default; + return global::OpenRouter.InputReferenceVariant1TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class ContentPartImageTypeJsonConverter : global::System.Text.Json case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenRouter.ContentPartImageType)numValue; + return (global::OpenRouter.InputReferenceVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::OpenRouter.ContentPartImageType); + return default(global::OpenRouter.InputReferenceVariant1Type); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class ContentPartImageTypeJsonConverter : global::System.Text.Json /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenRouter.ContentPartImageType value, + global::OpenRouter.InputReferenceVariant1Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::OpenRouter.ContentPartImageTypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::OpenRouter.InputReferenceVariant1TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ContentPartImageTypeNullable.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant1TypeNullable.g.cs similarity index 68% rename from src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ContentPartImageTypeNullable.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant1TypeNullable.g.cs index b6baa792..fcd74e86 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ContentPartImageTypeNullable.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant1TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace OpenRouter.JsonConverters { /// - public sealed class ContentPartImageTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class InputReferenceVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::OpenRouter.ContentPartImageType? Read( + public override global::OpenRouter.InputReferenceVariant1Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ContentPartImageTypeNullableJsonConverter : global::System.T var stringValue = reader.GetString(); if (stringValue != null) { - return global::OpenRouter.ContentPartImageTypeExtensions.ToEnum(stringValue); + return global::OpenRouter.InputReferenceVariant1TypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class ContentPartImageTypeNullableJsonConverter : global::System.T case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::OpenRouter.ContentPartImageType)numValue; + return (global::OpenRouter.InputReferenceVariant1Type)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::OpenRouter.ContentPartImageType?); + return default(global::OpenRouter.InputReferenceVariant1Type?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class ContentPartImageTypeNullableJsonConverter : global::System.T /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::OpenRouter.ContentPartImageType? value, + global::OpenRouter.InputReferenceVariant1Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::OpenRouter.ContentPartImageTypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::OpenRouter.InputReferenceVariant1TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant2Type.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant2Type.g.cs new file mode 100644 index 00000000..bfabcda4 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant2Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class InputReferenceVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReferenceVariant2Type 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::OpenRouter.InputReferenceVariant2TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.InputReferenceVariant2Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.InputReferenceVariant2Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReferenceVariant2Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenRouter.InputReferenceVariant2TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant2TypeNullable.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant2TypeNullable.g.cs new file mode 100644 index 00000000..a8c43c7f --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant2TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class InputReferenceVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReferenceVariant2Type? 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::OpenRouter.InputReferenceVariant2TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.InputReferenceVariant2Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.InputReferenceVariant2Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReferenceVariant2Type? 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::OpenRouter.InputReferenceVariant2TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant3Type.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant3Type.g.cs new file mode 100644 index 00000000..72ce0694 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant3Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class InputReferenceVariant3TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReferenceVariant3Type 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::OpenRouter.InputReferenceVariant3TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.InputReferenceVariant3Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.InputReferenceVariant3Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReferenceVariant3Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenRouter.InputReferenceVariant3TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant3TypeNullable.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant3TypeNullable.g.cs new file mode 100644 index 00000000..6eb481a7 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReferenceVariant3TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace OpenRouter.JsonConverters +{ + /// + public sealed class InputReferenceVariant3TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenRouter.InputReferenceVariant3Type? 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::OpenRouter.InputReferenceVariant3TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenRouter.InputReferenceVariant3Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::OpenRouter.InputReferenceVariant3Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenRouter.InputReferenceVariant3Type? 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::OpenRouter.InputReferenceVariant3TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs index a1a8cf8c..6ebc7a31 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContext.g.cs @@ -2333,9 +2333,21 @@ namespace OpenRouter typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullableJsonConverter), typeof(global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter), @@ -2617,6 +2629,8 @@ namespace OpenRouter typeof(global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceJsonConverter), + typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), @@ -5506,9 +5520,21 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullableJsonConverter), typeof(global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter), @@ -5790,6 +5816,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex typeof(global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceJsonConverter), + typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), @@ -8679,9 +8707,21 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullableJsonConverter), typeof(global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter), @@ -8963,6 +9003,8 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex typeof(global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceJsonConverter), + typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), @@ -11852,9 +11894,21 @@ internal sealed partial class SourceGenerationContextChunk2 : global::System.Tex typeof(global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter), - typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeNullableJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeNullableJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter), + + typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullableJsonConverter), typeof(global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter), @@ -12136,6 +12190,8 @@ internal sealed partial class SourceGenerationContextChunk2 : global::System.Tex typeof(global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter), + typeof(global::OpenRouter.JsonConverters.InputReferenceJsonConverter), + typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter), @@ -12256,15 +12312,24 @@ internal sealed partial class SourceGenerationContextChunk2 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageType), TypeInfoPropertyName = "FrameImageType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImageFrameType), TypeInfoPropertyName = "FrameImageFrameType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.FrameImage))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImageImageUrl))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImageType), TypeInfoPropertyName = "ContentPartImageType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.ContentPartImage))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReference), TypeInfoPropertyName = "InputReference2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant1Type), TypeInfoPropertyName = "InputReferenceVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant2Type), TypeInfoPropertyName = "InputReferenceVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceVariant3Type), TypeInfoPropertyName = "InputReferenceVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.InputReferenceDiscriminatorType), TypeInfoPropertyName = "InputReferenceDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestProviderOptions))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestProvider))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequestResolution), TypeInfoPropertyName = "VideoGenerationRequestResolution2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationRequest))] [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::OpenRouter.VideoGenerationResponseStatus), TypeInfoPropertyName = "VideoGenerationResponseStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationUsage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::OpenRouter.VideoGenerationResponse))] @@ -12425,7 +12490,7 @@ internal sealed partial class SourceGenerationContextChunk2 : global::System.Tex [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))] @@ -13640,8 +13705,14 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::OpenRouter.JsonConverters.FrameImageTypeNullableJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.FrameImageFrameTypeJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.FrameImageFrameTypeNullableJsonConverter()); - options.Converters.Add(new global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter()); - options.Converters.Add(new global::OpenRouter.JsonConverters.ContentPartImageTypeNullableJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceVariant1TypeNullableJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceVariant2TypeNullableJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceVariant3TypeNullableJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeNullableJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.VideoGenerationRequestResolutionNullableJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.VideoGenerationResponseStatusJsonConverter()); @@ -13782,6 +13853,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSortJsonConverter()); + options.Converters.Add(new global::OpenRouter.JsonConverters.InputReferenceJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter()); options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter()); diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs index ae337bfd..d059dba5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonSerializerContextTypes.g.cs @@ -6272,215 +6272,251 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::OpenRouter.ContentPartImageImageUrl? Type1561 { get; set; } + public global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl? Type1561 { get; set; } /// /// /// - public global::OpenRouter.ContentPartImageType? Type1562 { get; set; } + public global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl? Type1562 { get; set; } /// /// /// - public global::OpenRouter.ContentPartImage? Type1563 { get; set; } + public global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl? Type1563 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequestProviderOptions? Type1564 { get; set; } + public global::OpenRouter.InputReference? Type1564 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequestProvider? Type1565 { get; set; } + public global::OpenRouter.InputReferenceVariant1? Type1565 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequestResolution? Type1566 { get; set; } + public global::OpenRouter.InputReferenceVariant1Type? Type1566 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationRequest? Type1567 { get; set; } + public global::OpenRouter.InputReferenceVariant2? Type1567 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1568 { get; set; } + public global::OpenRouter.InputReferenceVariant2Type? Type1568 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1569 { get; set; } + public global::OpenRouter.InputReferenceVariant3? Type1569 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationResponseStatus? Type1570 { get; set; } + public global::OpenRouter.InputReferenceVariant3Type? Type1570 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationUsage? Type1571 { get; set; } + public global::OpenRouter.InputReferenceDiscriminator? Type1571 { get; set; } /// /// /// - public global::OpenRouter.VideoGenerationResponse? Type1572 { get; set; } + public global::OpenRouter.InputReferenceDiscriminatorType? Type1572 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedAspectRatiosItems? Type1573 { get; set; } + public global::OpenRouter.VideoGenerationRequestProviderOptions? Type1573 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedFrameImagesItems? Type1574 { get; set; } + public global::OpenRouter.VideoGenerationRequestProvider? Type1574 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedResolutionsItems? Type1575 { get; set; } + public global::OpenRouter.VideoGenerationRequestResolution? Type1575 { get; set; } /// /// /// - public global::OpenRouter.VideoModelSupportedSizesItems? Type1576 { get; set; } + public global::OpenRouter.VideoGenerationRequest? Type1576 { get; set; } /// /// /// - public global::OpenRouter.VideoModel? Type1577 { get; set; } + public global::System.Collections.Generic.IList? Type1577 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1578 { get; set; } + public global::System.Collections.Generic.IList? Type1578 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1579 { get; set; } + public global::OpenRouter.VideoGenerationResponseStatus? Type1579 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1580 { get; set; } + public global::OpenRouter.VideoGenerationUsage? Type1580 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1581 { get; set; } + public global::OpenRouter.VideoGenerationResponse? Type1581 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1582 { get; set; } + public global::OpenRouter.VideoModelSupportedAspectRatiosItems? Type1582 { get; set; } /// /// /// - public global::OpenRouter.VideoModelsListResponse? Type1583 { get; set; } + public global::OpenRouter.VideoModelSupportedFrameImagesItems? Type1583 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1584 { get; set; } + public global::OpenRouter.VideoModelSupportedResolutionsItems? Type1584 { get; set; } /// /// /// - public global::OpenRouter.Workspace? Type1585 { get; set; } + public global::OpenRouter.VideoModelSupportedSizesItems? Type1585 { get; set; } /// /// /// - public global::OpenRouter.ListWorkspacesResponse? Type1586 { get; set; } + public global::OpenRouter.VideoModel? Type1586 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1587 { get; set; } + public global::System.Collections.Generic.IList? Type1587 { get; set; } /// /// /// - public global::OpenRouter.CreateWorkspaceRequest? Type1588 { get; set; } + public global::System.Collections.Generic.IList? Type1588 { get; set; } /// /// /// - public global::OpenRouter.CreateWorkspaceResponseData? Type1589 { get; set; } + public global::System.Collections.Generic.IList? Type1589 { get; set; } /// /// /// - public global::OpenRouter.CreateWorkspaceResponse? Type1590 { get; set; } + public global::System.Collections.Generic.IList? Type1590 { get; set; } /// /// /// - public global::OpenRouter.GetWorkspaceResponseData? Type1591 { get; set; } + public global::System.Collections.Generic.IList? Type1591 { get; set; } /// /// /// - public global::OpenRouter.GetWorkspaceResponse? Type1592 { get; set; } + public global::OpenRouter.VideoModelsListResponse? Type1592 { get; set; } /// /// /// - public global::OpenRouter.DeleteWorkspaceResponse? Type1593 { get; set; } + public global::System.Collections.Generic.IList? Type1593 { get; set; } /// /// /// - public global::OpenRouter.UpdateWorkspaceRequest? Type1594 { get; set; } + public global::OpenRouter.Workspace? Type1594 { get; set; } /// /// /// - public global::OpenRouter.UpdateWorkspaceResponseData? Type1595 { get; set; } + public global::OpenRouter.ListWorkspacesResponse? Type1595 { get; set; } /// /// /// - public global::OpenRouter.UpdateWorkspaceResponse? Type1596 { get; set; } + public global::System.Collections.Generic.IList? Type1596 { get; set; } /// /// /// - public global::OpenRouter.BulkAddWorkspaceMembersRequest? Type1597 { get; set; } + public global::OpenRouter.CreateWorkspaceRequest? Type1597 { get; set; } /// /// /// - public global::OpenRouter.WorkspaceMemberRole? Type1598 { get; set; } + public global::OpenRouter.CreateWorkspaceResponseData? Type1598 { get; set; } /// /// /// - public global::OpenRouter.WorkspaceMember? Type1599 { get; set; } + public global::OpenRouter.CreateWorkspaceResponse? Type1599 { get; set; } /// /// /// - public global::OpenRouter.BulkAddWorkspaceMembersResponse? Type1600 { get; set; } + public global::OpenRouter.GetWorkspaceResponseData? Type1600 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1601 { get; set; } + public global::OpenRouter.GetWorkspaceResponse? Type1601 { get; set; } /// /// /// - public global::OpenRouter.BulkRemoveWorkspaceMembersRequest? Type1602 { get; set; } + public global::OpenRouter.DeleteWorkspaceResponse? Type1602 { get; set; } /// /// /// - public global::OpenRouter.BulkRemoveWorkspaceMembersResponse? Type1603 { get; set; } + public global::OpenRouter.UpdateWorkspaceRequest? Type1603 { get; set; } /// /// /// - public global::OpenRouter.ExchangeAuthCodeForApiKeyRequest? Type1604 { get; set; } + public global::OpenRouter.UpdateWorkspaceResponseData? Type1604 { get; set; } /// /// /// - public global::OpenRouter.OneOf? Type1605 { get; set; } + public global::OpenRouter.UpdateWorkspaceResponse? Type1605 { get; set; } /// /// /// - public global::OpenRouter.CreateAuthKeysCodeRequest? Type1606 { get; set; } + public global::OpenRouter.BulkAddWorkspaceMembersRequest? Type1606 { get; set; } /// /// /// - public global::OpenRouter.CreateEmbeddingsRequest? Type1607 { get; set; } + public global::OpenRouter.WorkspaceMemberRole? Type1607 { get; set; } /// /// /// - public global::OpenRouter.CreateKeysRequest? Type1608 { get; set; } + public global::OpenRouter.WorkspaceMember? Type1608 { get; set; } /// /// /// - public global::OpenRouter.OneOf? Type1609 { get; set; } + public global::OpenRouter.BulkAddWorkspaceMembersResponse? Type1609 { get; set; } /// /// /// - public global::OpenRouter.UpdateKeysRequest? Type1610 { get; set; } + public global::System.Collections.Generic.IList? Type1610 { get; set; } /// /// /// - public global::OpenRouter.OneOf? Type1611 { get; set; } + public global::OpenRouter.BulkRemoveWorkspaceMembersRequest? Type1611 { get; set; } /// /// /// - public global::OpenRouter.CreateRerankRequest? Type1612 { get; set; } + public global::OpenRouter.BulkRemoveWorkspaceMembersResponse? Type1612 { get; set; } /// /// /// - public byte[]? Type1613 { get; set; } + public global::OpenRouter.ExchangeAuthCodeForApiKeyRequest? Type1613 { get; set; } + /// + /// + /// + public global::OpenRouter.OneOf? Type1614 { get; set; } + /// + /// + /// + public global::OpenRouter.CreateAuthKeysCodeRequest? Type1615 { get; set; } + /// + /// + /// + public global::OpenRouter.CreateEmbeddingsRequest? Type1616 { get; set; } + /// + /// + /// + public global::OpenRouter.CreateKeysRequest? Type1617 { get; set; } + /// + /// + /// + public global::OpenRouter.OneOf? Type1618 { get; set; } + /// + /// + /// + public global::OpenRouter.UpdateKeysRequest? Type1619 { get; set; } + /// + /// + /// + public global::OpenRouter.OneOf? Type1620 { get; set; } + /// + /// + /// + public global::OpenRouter.CreateRerankRequest? Type1621 { get; set; } + /// + /// + /// + public byte[]? Type1622 { get; set; } /// /// @@ -6949,7 +6985,7 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType116 { get; set; } + public global::System.Collections.Generic.List? ListType116 { get; set; } /// /// /// diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImage.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.Json.g.cs similarity index 87% rename from src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImage.Json.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.Json.g.cs index 5add0454..da9e6b99 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImage.Json.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.Json.g.cs @@ -2,7 +2,7 @@ namespace OpenRouter { - public sealed partial class ContentPartImage + public readonly partial struct InputReference { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenRouter.ContentPartImage? FromJson( + public static global::OpenRouter.InputReference? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenRouter.ContentPartImage), - jsonSerializerContext) as global::OpenRouter.ContentPartImage; + typeof(global::OpenRouter.InputReference), + jsonSerializerContext) as global::OpenRouter.InputReference?; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenRouter.ContentPartImage? FromJson( + public static global::OpenRouter.InputReference? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::OpenRouter.ContentPartImage), - jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.ContentPartImage; + typeof(global::OpenRouter.InputReference), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReference?; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs new file mode 100644 index 00000000..e9ad842c --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs @@ -0,0 +1,386 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenRouter +{ + /// + /// A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0). + /// + public readonly partial struct InputReference : global::System.IEquatable + { + /// + /// + /// + public global::OpenRouter.InputReferenceDiscriminatorType? Type { get; } + + /// + /// audio_url variant + /// +#if NET6_0_OR_GREATER + public global::OpenRouter.InputReferenceVariant1? AudioUrl { get; init; } +#else + public global::OpenRouter.InputReferenceVariant1? AudioUrl { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AudioUrl))] +#endif + public bool IsAudioUrl => AudioUrl != null; + + /// + /// + /// + public bool TryPickAudioUrl( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::OpenRouter.InputReferenceVariant1? value) + { + value = AudioUrl; + return IsAudioUrl; + } + + /// + /// + /// + public global::OpenRouter.InputReferenceVariant1 PickAudioUrl() => IsAudioUrl + ? AudioUrl! + : throw new global::System.InvalidOperationException($"Expected union variant 'AudioUrl' but the value was {ToString()}."); + + /// + /// image_url variant + /// +#if NET6_0_OR_GREATER + public global::OpenRouter.InputReferenceVariant2? ImageUrl { get; init; } +#else + public global::OpenRouter.InputReferenceVariant2? ImageUrl { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] +#endif + public bool IsImageUrl => ImageUrl != null; + + /// + /// + /// + public bool TryPickImageUrl( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::OpenRouter.InputReferenceVariant2? value) + { + value = ImageUrl; + return IsImageUrl; + } + + /// + /// + /// + public global::OpenRouter.InputReferenceVariant2 PickImageUrl() => IsImageUrl + ? ImageUrl! + : throw new global::System.InvalidOperationException($"Expected union variant 'ImageUrl' but the value was {ToString()}."); + + /// + /// video_url variant + /// +#if NET6_0_OR_GREATER + public global::OpenRouter.InputReferenceVariant3? VideoUrl { get; init; } +#else + public global::OpenRouter.InputReferenceVariant3? VideoUrl { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VideoUrl))] +#endif + public bool IsVideoUrl => VideoUrl != null; + + /// + /// + /// + public bool TryPickVideoUrl( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::OpenRouter.InputReferenceVariant3? value) + { + value = VideoUrl; + return IsVideoUrl; + } + + /// + /// + /// + public global::OpenRouter.InputReferenceVariant3 PickVideoUrl() => IsVideoUrl + ? VideoUrl! + : throw new global::System.InvalidOperationException($"Expected union variant 'VideoUrl' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator InputReference(global::OpenRouter.InputReferenceVariant1 value) => new InputReference((global::OpenRouter.InputReferenceVariant1?)value); + + /// + /// + /// + public static implicit operator global::OpenRouter.InputReferenceVariant1?(InputReference @this) => @this.AudioUrl; + + /// + /// + /// + public InputReference(global::OpenRouter.InputReferenceVariant1? value) + { + AudioUrl = value; + } + + /// + /// + /// + public static InputReference FromAudioUrl(global::OpenRouter.InputReferenceVariant1? value) => new InputReference(value); + + /// + /// + /// + public static implicit operator InputReference(global::OpenRouter.InputReferenceVariant2 value) => new InputReference((global::OpenRouter.InputReferenceVariant2?)value); + + /// + /// + /// + public static implicit operator global::OpenRouter.InputReferenceVariant2?(InputReference @this) => @this.ImageUrl; + + /// + /// + /// + public InputReference(global::OpenRouter.InputReferenceVariant2? value) + { + ImageUrl = value; + } + + /// + /// + /// + public static InputReference FromImageUrl(global::OpenRouter.InputReferenceVariant2? value) => new InputReference(value); + + /// + /// + /// + public static implicit operator InputReference(global::OpenRouter.InputReferenceVariant3 value) => new InputReference((global::OpenRouter.InputReferenceVariant3?)value); + + /// + /// + /// + public static implicit operator global::OpenRouter.InputReferenceVariant3?(InputReference @this) => @this.VideoUrl; + + /// + /// + /// + public InputReference(global::OpenRouter.InputReferenceVariant3? value) + { + VideoUrl = value; + } + + /// + /// + /// + public static InputReference FromVideoUrl(global::OpenRouter.InputReferenceVariant3? value) => new InputReference(value); + + /// + /// + /// + public InputReference( + global::OpenRouter.InputReferenceDiscriminatorType? type, + global::OpenRouter.InputReferenceVariant1? audioUrl, + global::OpenRouter.InputReferenceVariant2? imageUrl, + global::OpenRouter.InputReferenceVariant3? videoUrl + ) + { + Type = type; + + AudioUrl = audioUrl; + ImageUrl = imageUrl; + VideoUrl = videoUrl; + } + + /// + /// + /// + public object? Object => + VideoUrl as object ?? + ImageUrl as object ?? + AudioUrl as object + ; + + /// + /// + /// + public override string? ToString() => + AudioUrl?.ToString() ?? + ImageUrl?.ToString() ?? + VideoUrl?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAudioUrl && !IsImageUrl && !IsVideoUrl || !IsAudioUrl && IsImageUrl && !IsVideoUrl || !IsAudioUrl && !IsImageUrl && IsVideoUrl; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? audioUrl = null, + global::System.Func? imageUrl = null, + global::System.Func? videoUrl = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAudioUrl && audioUrl != null) + { + return audioUrl(AudioUrl!); + } + else if (IsImageUrl && imageUrl != null) + { + return imageUrl(ImageUrl!); + } + else if (IsVideoUrl && videoUrl != null) + { + return videoUrl(VideoUrl!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? audioUrl = null, + + global::System.Action? imageUrl = null, + + global::System.Action? videoUrl = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAudioUrl) + { + audioUrl?.Invoke(AudioUrl!); + } + else if (IsImageUrl) + { + imageUrl?.Invoke(ImageUrl!); + } + else if (IsVideoUrl) + { + videoUrl?.Invoke(VideoUrl!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? audioUrl = null, + global::System.Action? imageUrl = null, + global::System.Action? videoUrl = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAudioUrl) + { + audioUrl?.Invoke(AudioUrl!); + } + else if (IsImageUrl) + { + imageUrl?.Invoke(ImageUrl!); + } + else if (IsVideoUrl) + { + videoUrl?.Invoke(VideoUrl!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AudioUrl, + typeof(global::OpenRouter.InputReferenceVariant1), + ImageUrl, + typeof(global::OpenRouter.InputReferenceVariant2), + VideoUrl, + typeof(global::OpenRouter.InputReferenceVariant3), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InputReference other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AudioUrl, other.AudioUrl) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(VideoUrl, other.VideoUrl) + ; + } + + /// + /// + /// + public static bool operator ==(InputReference obj1, InputReference obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InputReference obj1, InputReference obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is InputReference o && Equals(o); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminator.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminator.Json.g.cs new file mode 100644 index 00000000..d555812a --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class InputReferenceDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.InputReferenceDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.InputReferenceDiscriminator), + jsonSerializerContext) as global::OpenRouter.InputReferenceDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.InputReferenceDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.InputReferenceDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminator.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminator.g.cs new file mode 100644 index 00000000..2bb32dd3 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// + /// + public sealed partial class InputReferenceDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.InputReferenceDiscriminatorTypeJsonConverter))] + public global::OpenRouter.InputReferenceDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputReferenceDiscriminator( + global::OpenRouter.InputReferenceDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public InputReferenceDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingAudioUrlAudioUrl.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingAudioUrlAudioUrl.Json.g.cs new file mode 100644 index 00000000..12d70413 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingAudioUrlAudioUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class InputReferenceDiscriminatorMappingAudioUrlAudioUrl + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl), + jsonSerializerContext) as global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageImageUrl.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingAudioUrlAudioUrl.g.cs similarity index 70% rename from src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageImageUrl.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingAudioUrlAudioUrl.g.cs index c037e40f..f65977df 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageImageUrl.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingAudioUrlAudioUrl.g.cs @@ -6,7 +6,7 @@ namespace OpenRouter /// /// /// - public sealed partial class ContentPartImageImageUrl + public sealed partial class InputReferenceDiscriminatorMappingAudioUrlAudioUrl { /// /// @@ -22,22 +22,22 @@ public sealed partial class ContentPartImageImageUrl public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ContentPartImageImageUrl( + public InputReferenceDiscriminatorMappingAudioUrlAudioUrl( string url) { this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ContentPartImageImageUrl() + public InputReferenceDiscriminatorMappingAudioUrlAudioUrl() { } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingImageUrlImageUrl.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingImageUrlImageUrl.Json.g.cs new file mode 100644 index 00000000..6b02e750 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingImageUrlImageUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class InputReferenceDiscriminatorMappingImageUrlImageUrl + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl), + jsonSerializerContext) as global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingImageUrlImageUrl.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingImageUrlImageUrl.g.cs new file mode 100644 index 00000000..f01a637e --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingImageUrlImageUrl.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// + /// + public sealed partial class InputReferenceDiscriminatorMappingImageUrlImageUrl + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputReferenceDiscriminatorMappingImageUrlImageUrl( + string url) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + } + + /// + /// Initializes a new instance of the class. + /// + public InputReferenceDiscriminatorMappingImageUrlImageUrl() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingVideoUrlVideoUrl.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingVideoUrlVideoUrl.Json.g.cs new file mode 100644 index 00000000..98a728f8 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingVideoUrlVideoUrl.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class InputReferenceDiscriminatorMappingVideoUrlVideoUrl + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl), + jsonSerializerContext) as global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingVideoUrlVideoUrl.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingVideoUrlVideoUrl.g.cs new file mode 100644 index 00000000..56f81cd3 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorMappingVideoUrlVideoUrl.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// + /// + public sealed partial class InputReferenceDiscriminatorMappingVideoUrlVideoUrl + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputReferenceDiscriminatorMappingVideoUrlVideoUrl( + string url) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + } + + /// + /// Initializes a new instance of the class. + /// + public InputReferenceDiscriminatorMappingVideoUrlVideoUrl() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorType.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorType.g.cs new file mode 100644 index 00000000..9ec12a08 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// + /// + public enum InputReferenceDiscriminatorType + { + /// + /// + /// + AudioUrl, + /// + /// + /// + ImageUrl, + /// + /// + /// + VideoUrl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputReferenceDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputReferenceDiscriminatorType value) + { + return value switch + { + InputReferenceDiscriminatorType.AudioUrl => "audio_url", + InputReferenceDiscriminatorType.ImageUrl => "image_url", + InputReferenceDiscriminatorType.VideoUrl => "video_url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputReferenceDiscriminatorType? ToEnum(string value) + { + return value switch + { + "audio_url" => InputReferenceDiscriminatorType.AudioUrl, + "image_url" => InputReferenceDiscriminatorType.ImageUrl, + "video_url" => InputReferenceDiscriminatorType.VideoUrl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageImageUrl.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1.Json.g.cs similarity index 86% rename from src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageImageUrl.Json.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1.Json.g.cs index 151b5510..c0c9c61a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageImageUrl.Json.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1.Json.g.cs @@ -2,7 +2,7 @@ namespace OpenRouter { - public sealed partial class ContentPartImageImageUrl + public sealed partial class InputReferenceVariant1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::OpenRouter.ContentPartImageImageUrl? FromJson( + public static global::OpenRouter.InputReferenceVariant1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::OpenRouter.ContentPartImageImageUrl), - jsonSerializerContext) as global::OpenRouter.ContentPartImageImageUrl; + typeof(global::OpenRouter.InputReferenceVariant1), + jsonSerializerContext) as global::OpenRouter.InputReferenceVariant1; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::OpenRouter.ContentPartImageImageUrl? FromJson( + public static global::OpenRouter.InputReferenceVariant1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::OpenRouter.ContentPartImageImageUrl), - jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.ContentPartImageImageUrl; + typeof(global::OpenRouter.InputReferenceVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceVariant1; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1.g.cs new file mode 100644 index 00000000..710f4293 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// audio_url variant + /// + public sealed partial class InputReferenceVariant1 + { + /// + /// Discriminator value: audio_url + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.InputReferenceVariant1TypeJsonConverter))] + public global::OpenRouter.InputReferenceVariant1Type Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audio_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl AudioUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Discriminator value: audio_url + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputReferenceVariant1( + global::OpenRouter.InputReferenceDiscriminatorMappingAudioUrlAudioUrl audioUrl, + global::OpenRouter.InputReferenceVariant1Type type) + { + this.Type = type; + this.AudioUrl = audioUrl ?? throw new global::System.ArgumentNullException(nameof(audioUrl)); + } + + /// + /// Initializes a new instance of the class. + /// + public InputReferenceVariant1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1Type.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1Type.g.cs new file mode 100644 index 00000000..edcd6c66 --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant1Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// Discriminator value: audio_url + /// + public enum InputReferenceVariant1Type + { + /// + /// audio_url + /// + AudioUrl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputReferenceVariant1TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputReferenceVariant1Type value) + { + return value switch + { + InputReferenceVariant1Type.AudioUrl => "audio_url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputReferenceVariant1Type? ToEnum(string value) + { + return value switch + { + "audio_url" => InputReferenceVariant1Type.AudioUrl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2.Json.g.cs new file mode 100644 index 00000000..448773dc --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class InputReferenceVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.InputReferenceVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.InputReferenceVariant2), + jsonSerializerContext) as global::OpenRouter.InputReferenceVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.InputReferenceVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.InputReferenceVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImage.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2.g.cs similarity index 57% rename from src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImage.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2.g.cs index 56291324..87098a71 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImage.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2.g.cs @@ -4,23 +4,23 @@ namespace OpenRouter { /// - /// + /// image_url variant /// - public sealed partial class ContentPartImage + public sealed partial class InputReferenceVariant2 { /// - /// + /// Discriminator value: image_url /// - [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::OpenRouter.ContentPartImageImageUrl ImageUrl { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.InputReferenceVariant2TypeJsonConverter))] + public global::OpenRouter.InputReferenceVariant2Type Type { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.ContentPartImageTypeJsonConverter))] - public global::OpenRouter.ContentPartImageType Type { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("image_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl ImageUrl { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -29,25 +29,27 @@ public sealed partial class ContentPartImage public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// - /// + /// + /// Discriminator value: image_url + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ContentPartImage( - global::OpenRouter.ContentPartImageImageUrl imageUrl, - global::OpenRouter.ContentPartImageType type) + public InputReferenceVariant2( + global::OpenRouter.InputReferenceDiscriminatorMappingImageUrlImageUrl imageUrl, + global::OpenRouter.InputReferenceVariant2Type type) { - this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); this.Type = type; + this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ContentPartImage() + public InputReferenceVariant2() { } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageType.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2Type.g.cs similarity index 62% rename from src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageType.g.cs rename to src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2Type.g.cs index 76a83fa4..b2e49894 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ContentPartImageType.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant2Type.g.cs @@ -4,12 +4,12 @@ namespace OpenRouter { /// - /// + /// Discriminator value: image_url /// - public enum ContentPartImageType + public enum InputReferenceVariant2Type { /// - /// + /// image_url /// ImageUrl, } @@ -17,27 +17,27 @@ public enum ContentPartImageType /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ContentPartImageTypeExtensions + public static class InputReferenceVariant2TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ContentPartImageType value) + public static string ToValueString(this InputReferenceVariant2Type value) { return value switch { - ContentPartImageType.ImageUrl => "image_url", + InputReferenceVariant2Type.ImageUrl => "image_url", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ContentPartImageType? ToEnum(string value) + public static InputReferenceVariant2Type? ToEnum(string value) { return value switch { - "image_url" => ContentPartImageType.ImageUrl, + "image_url" => InputReferenceVariant2Type.ImageUrl, _ => null, }; } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3.Json.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3.Json.g.cs new file mode 100644 index 00000000..92578c9f --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenRouter +{ + public sealed partial class InputReferenceVariant3 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenRouter.InputReferenceVariant3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenRouter.InputReferenceVariant3), + jsonSerializerContext) as global::OpenRouter.InputReferenceVariant3; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenRouter.InputReferenceVariant3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenRouter.InputReferenceVariant3), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.InputReferenceVariant3; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3.g.cs new file mode 100644 index 00000000..7e52048e --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// video_url variant + /// + public sealed partial class InputReferenceVariant3 + { + /// + /// Discriminator value: video_url + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.InputReferenceVariant3TypeJsonConverter))] + public global::OpenRouter.InputReferenceVariant3Type Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("video_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl VideoUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Discriminator value: video_url + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InputReferenceVariant3( + global::OpenRouter.InputReferenceDiscriminatorMappingVideoUrlVideoUrl videoUrl, + global::OpenRouter.InputReferenceVariant3Type type) + { + this.Type = type; + this.VideoUrl = videoUrl ?? throw new global::System.ArgumentNullException(nameof(videoUrl)); + } + + /// + /// Initializes a new instance of the class. + /// + public InputReferenceVariant3() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3Type.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3Type.g.cs new file mode 100644 index 00000000..d2bd6a6e --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReferenceVariant3Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenRouter +{ + /// + /// Discriminator value: video_url + /// + public enum InputReferenceVariant3Type + { + /// + /// video_url + /// + VideoUrl, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class InputReferenceVariant3TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this InputReferenceVariant3Type value) + { + return value switch + { + InputReferenceVariant3Type.VideoUrl => "video_url", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static InputReferenceVariant3Type? ToEnum(string value) + { + return value switch + { + "video_url" => InputReferenceVariant3Type.VideoUrl, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs index 8b445e8c..985e8647 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.VideoGenerationRequest.g.cs @@ -40,10 +40,10 @@ public sealed partial class VideoGenerationRequest public bool? GenerateAudio { get; set; } /// - /// Reference images to guide video generation + /// Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest. /// [global::System.Text.Json.Serialization.JsonPropertyName("input_references")] - public global::System.Collections.Generic.IList? InputReferences { get; set; } + public global::System.Collections.Generic.IList? InputReferences { get; set; } /// /// @@ -111,7 +111,7 @@ public sealed partial class VideoGenerationRequest /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// /// - /// Reference images to guide video generation + /// Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest. /// /// /// Provider-specific passthrough configuration @@ -136,7 +136,7 @@ public VideoGenerationRequest( int? duration, global::System.Collections.Generic.IList? frameImages, bool? generateAudio, - global::System.Collections.Generic.IList? inputReferences, + global::System.Collections.Generic.IList? inputReferences, global::OpenRouter.VideoGenerationRequestProvider? provider, global::OpenRouter.VideoGenerationRequestResolution? resolution, int? seed, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs index f520ba5a..9d5571a1 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageVideoGenerationClient.CreateVideos.g.cs @@ -675,7 +675,7 @@ partial void ProcessCreateVideosResponseContent( /// Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. /// /// - /// Reference images to guide video generation + /// Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest. /// /// /// @@ -702,7 +702,7 @@ partial void ProcessCreateVideosResponseContent( int? duration = default, global::System.Collections.Generic.IList? frameImages = default, bool? generateAudio = default, - global::System.Collections.Generic.IList? inputReferences = default, + global::System.Collections.Generic.IList? inputReferences = default, global::OpenRouter.VideoGenerationRequestProvider? provider = default, global::OpenRouter.VideoGenerationRequestResolution? resolution = default, int? seed = default, diff --git a/src/libs/OpenRouter/openapi.yaml b/src/libs/OpenRouter/openapi.yaml index 0ef4bd7d..779f906e 100644 --- a/src/libs/OpenRouter/openapi.yaml +++ b/src/libs/OpenRouter/openapi.yaml @@ -35529,7 +35529,7 @@ ], "title": "FrameImage" }, - "ContentPartImageImageUrl": { + "InputReferenceDiscriminatorMappingAudioUrlAudioUrl": { "type": "object", "properties": { "url": { @@ -35539,30 +35539,100 @@ "required": [ "url" ], - "title": "ContentPartImageImageUrl" + "title": "InputReferenceDiscriminatorMappingAudioUrlAudioUrl" }, - "ContentPartImageType": { - "type": "string", - "enum": [ - "image_url" + "InputReferenceDiscriminatorMappingImageUrlImageUrl": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" ], - "title": "ContentPartImageType" + "title": "InputReferenceDiscriminatorMappingImageUrlImageUrl" }, - "ContentPartImage": { + "InputReferenceDiscriminatorMappingVideoUrlVideoUrl": { "type": "object", "properties": { - "image_url": { - "$ref": "#/components/schemas/ContentPartImageImageUrl" - }, - "type": { - "$ref": "#/components/schemas/ContentPartImageType" + "url": { + "type": "string" } }, "required": [ - "image_url", - "type" + "url" ], - "title": "ContentPartImage" + "title": "InputReferenceDiscriminatorMappingVideoUrlVideoUrl" + }, + "InputReference": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "audio_url" + ], + "description": "Discriminator value: audio_url" + }, + "audio_url": { + "$ref": "#/components/schemas/InputReferenceDiscriminatorMappingAudioUrlAudioUrl" + } + }, + "required": [ + "type", + "audio_url" + ], + "description": "audio_url variant" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "image_url" + ], + "description": "Discriminator value: image_url" + }, + "image_url": { + "$ref": "#/components/schemas/InputReferenceDiscriminatorMappingImageUrlImageUrl" + } + }, + "required": [ + "type", + "image_url" + ], + "description": "image_url variant" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "video_url" + ], + "description": "Discriminator value: video_url" + }, + "video_url": { + "$ref": "#/components/schemas/InputReferenceDiscriminatorMappingVideoUrlVideoUrl" + } + }, + "required": [ + "type", + "video_url" + ], + "description": "video_url variant" + } + ], + "discriminator": { + "propertyName": "type" + }, + "description": "A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0).", + "title": "InputReference" }, "VideoGenerationRequestProviderOptions": { "type": "object", @@ -36302,9 +36372,9 @@ "input_references": { "type": "array", "items": { - "$ref": "#/components/schemas/ContentPartImage" + "$ref": "#/components/schemas/InputReference" }, - "description": "Reference images to guide video generation" + "description": "Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest." }, "model": { "type": "string"