diff --git a/src/libs/Anthropic/Generated/Anthropic.AnthropicApi.CreateMessage.g.cs b/src/libs/Anthropic/Generated/Anthropic.AnthropicApi.CreateMessage.g.cs index 53a686b..a39aded 100644 --- a/src/libs/Anthropic/Generated/Anthropic.AnthropicApi.CreateMessage.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.AnthropicApi.CreateMessage.g.cs @@ -306,11 +306,11 @@ partial void ProcessCreateMessageResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateMessageAsync( - global::System.AnyOf model, + global::System.AnyOf model, global::System.Collections.Generic.IList messages, int maxTokens, global::Anthropic.CreateMessageRequestMetadata? metadata = default, - global::System.Collections.Generic.IList? stopSequences = default, + global::System.Collections.Generic.IList? stopSequences = default, string? system = default, double temperature = default, global::Anthropic.ToolChoice? toolChoice = default, diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockDeltaEvent.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockDeltaEvent.g.cs index 2c96c90..f8ad4be 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockDeltaEvent.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockDeltaEvent.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace Anthropic @@ -14,9 +12,9 @@ public sealed partial class ContentBlockDeltaEvent /// A delta in a streaming message. /// [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.BlockDeltaJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.OneOf Delta { get; set; } + public required global::Anthropic.BlockDelta Delta { get; set; } /// /// The index of the content block. diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockStartEvent.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockStartEvent.g.cs index 1d5aa03..71e7e3a 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockStartEvent.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.ContentBlockStartEvent.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace Anthropic @@ -14,9 +12,9 @@ public sealed partial class ContentBlockStartEvent /// A block of content in a message. /// [global::System.Text.Json.Serialization.JsonPropertyName("content_block")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory4))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.BlockJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.OneOf ContentBlock { get; set; } + public required global::Anthropic.Block ContentBlock { get; set; } /// /// The index of the content block. diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.CreateMessageRequest.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.CreateMessageRequest.g.cs index e9fcfd0..f20410f 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.CreateMessageRequest.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.CreateMessageRequest.g.cs @@ -19,7 +19,7 @@ public sealed partial class CreateMessageRequest [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.AnyOf Model { get; set; } + public required global::System.AnyOf Model { get; set; } /// /// Input messages.
@@ -124,7 +124,7 @@ public sealed partial class CreateMessageRequest /// and the response `stop_sequence` value will contain the matched stop sequence. ///
[global::System.Text.Json.Serialization.JsonPropertyName("stop_sequences")] - public global::System.Collections.Generic.IList? StopSequences { get; set; } + public global::System.Collections.Generic.IList? StopSequences { get; set; } /// /// System prompt.
diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.Message.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.Message.g.cs index 058a9db..064da7e 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.Message.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.Message.g.cs @@ -23,7 +23,7 @@ public sealed partial class Message [global::System.Text.Json.Serialization.JsonPropertyName("content")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.OneOf> Content { get; set; } + public required global::System.OneOf> Content { get; set; } /// /// The role of the messages author. diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.Tool.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.Tool.g.cs index 81863df..f108b66 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.Tool.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.Tool.g.cs @@ -32,7 +32,7 @@ public sealed partial class Tool /// [global::System.Text.Json.Serialization.JsonPropertyName("input_schema")] [global::System.Text.Json.Serialization.JsonRequired] - public required object InputSchema { get; set; } + public required global::Anthropic.ToolInputSchema InputSchema { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.ToolInputSchema.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.ToolInputSchema.g.cs new file mode 100644 index 0000000..9bce813 --- /dev/null +++ b/src/libs/Anthropic/Generated/Anthropic.Models.ToolInputSchema.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Anthropic +{ + /// + /// [JSON schema](https://json-schema.org/) for this tool's input.
+ /// This defines the shape of the `input` that your tool accepts and that the model
+ /// will produce. + ///
+ public sealed partial class ToolInputSchema + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.ToolResultBlock.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.ToolResultBlock.g.cs index 36567a9..00e6aaf 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.ToolResultBlock.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.ToolResultBlock.g.cs @@ -25,7 +25,7 @@ public sealed partial class ToolResultBlock [global::System.Text.Json.Serialization.JsonPropertyName("content")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.OneOf> Content { get; set; } + public required global::System.OneOf> Content { get; set; } /// /// Set to `true` if the tool execution resulted in an error. diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlock.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlock.g.cs index 536bfdf..7ffef78 100644 --- a/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlock.g.cs +++ b/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlock.g.cs @@ -30,7 +30,7 @@ public sealed partial class ToolUseBlock /// [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] - public required object Input { get; set; } + public required global::Anthropic.ToolUseBlockInput Input { get; set; } /// /// The type of content block.
diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlockInput.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlockInput.g.cs new file mode 100644 index 0000000..a1c6ec5 --- /dev/null +++ b/src/libs/Anthropic/Generated/Anthropic.Models.ToolUseBlockInput.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace Anthropic +{ + /// + /// An object containing the input being passed to the tool, conforming to the tool’s `input_schema`. + /// + public sealed partial class ToolUseBlockInput + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/Anthropic/Generated/JsonConverters.OneOf4.g.cs b/src/libs/Anthropic/Generated/JsonConverters.OneOf4.g.cs deleted file mode 100644 index e5a2a7b..0000000 --- a/src/libs/Anthropic/Generated/JsonConverters.OneOf4.g.cs +++ /dev/null @@ -1,152 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::System.OneOf 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; - T1? value1 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T2? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T3? value3 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - T4? value4 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - var result = new global::System.OneOf( - value1, - - value2, - - value3, - - value4 - ); - if (!result.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid JSON format for OneOf<{typeof(T1).Name}, {typeof(T2).Name}, {typeof(T3).Name}, {typeof(T4).Name}>"); - } - - if (value1 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - else if (value3 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - else if (value4 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::System.OneOf 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.Validate()) - { - throw new global::System.Text.Json.JsonException($"Invalid OneOf<{typeof(T1).Name}, {typeof(T2).Name}, {typeof(T3).Name}, {typeof(T4).Name}> object."); - } - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); - } - - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } - - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); - } - - else if (value.IsValue4) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Anthropic/Generated/JsonConverters.OneOfFactory4.g.cs b/src/libs/Anthropic/Generated/JsonConverters.OneOfFactory4.g.cs deleted file mode 100644 index 1b17671..0000000 --- a/src/libs/Anthropic/Generated/JsonConverters.OneOfFactory4.g.cs +++ /dev/null @@ -1,25 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class OneOfJsonConverterFactory4 : global::System.Text.Json.Serialization.JsonConverterFactory - { - /// - public override bool CanConvert(global::System.Type? typeToConvert) - { - return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.OneOf<,,,>); - } - - /// - public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); - - return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( - typeof(OneOfJsonConverter<,,,>).MakeGenericType(typeToConvert.GenericTypeArguments))!; - } - } -} diff --git a/src/libs/Anthropic/Generated/JsonSerializerContext.g.cs b/src/libs/Anthropic/Generated/JsonSerializerContext.g.cs index 3bd22cc..0eeab5e 100644 --- a/src/libs/Anthropic/Generated/JsonSerializerContext.g.cs +++ b/src/libs/Anthropic/Generated/JsonSerializerContext.g.cs @@ -12,21 +12,20 @@ namespace Anthropic { typeof(global::OpenApiGenerator.JsonConverters.CreateMessageRequestModelJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.CreateMessageRequestModelNullableJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.ToolChoiceTypeJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.ToolChoiceTypeNullableJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.MessageRoleJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.MessageRoleNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ImageBlockSourceMediaTypeJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ImageBlockSourceMediaTypeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ImageBlockSourceTypeJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ImageBlockSourceTypeNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.MessageRoleJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.MessageRoleNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.StopReasonJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.StopReasonNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.ToolChoiceTypeJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.ToolChoiceTypeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.MessageStreamEventTypeJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.MessageStreamEventTypeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2), typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2), - typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory4), typeof(global::OpenApiGenerator.JsonConverters.BlockJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.MessageStreamEventJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.BlockDeltaJsonConverter), diff --git a/src/libs/Anthropic/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Anthropic/Generated/JsonSerializerContextTypes.g.cs index b6ac807..5656d21 100644 --- a/src/libs/Anthropic/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/Anthropic/Generated/JsonSerializerContextTypes.g.cs @@ -13,106 +13,178 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.AnyOf? Type0 { get; set; } + public global::Anthropic.CreateMessageRequest? Type0 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1 { get; set; } + public global::System.AnyOf? Type1 { get; set; } /// /// /// - public int? Type2 { get; set; } + public string? Type2 { get; set; } /// /// /// - public global::Anthropic.CreateMessageRequestMetadata? Type3 { get; set; } + public global::Anthropic.CreateMessageRequestModel? Type3 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type4 { get; set; } + public global::System.Collections.Generic.IList? Type4 { get; set; } /// /// /// - public string? Type5 { get; set; } + public global::Anthropic.Message? Type5 { get; set; } /// /// /// - public double? Type6 { get; set; } + public global::System.OneOf>? Type6 { get; set; } /// /// /// - public global::Anthropic.ToolChoice? Type7 { get; set; } + public global::System.Collections.Generic.IList? Type7 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type8 { get; set; } + public global::Anthropic.Block? Type8 { get; set; } /// /// /// - public bool? Type9 { get; set; } + public global::Anthropic.TextBlock? Type9 { get; set; } /// /// /// - public global::Anthropic.ToolChoiceType? Type10 { get; set; } + public global::Anthropic.ImageBlock? Type10 { get; set; } /// /// /// - public global::System.OneOf>? Type11 { get; set; } + public global::Anthropic.ImageBlockSource? Type11 { get; set; } /// /// /// - public global::Anthropic.MessageRole? Type12 { get; set; } + public global::Anthropic.ImageBlockSourceMediaType? Type12 { get; set; } /// /// /// - public global::Anthropic.StopReason? Type13 { get; set; } + public global::Anthropic.ImageBlockSourceType? Type13 { get; set; } /// /// /// - public global::Anthropic.Usage? Type14 { get; set; } + public global::Anthropic.ToolUseBlock? Type14 { get; set; } /// /// /// - public object? Type15 { get; set; } + public global::Anthropic.ToolUseBlockInput? Type15 { get; set; } /// /// /// - public global::Anthropic.ImageBlockSource? Type16 { get; set; } + public global::Anthropic.ToolResultBlock? Type16 { get; set; } /// /// /// - public global::Anthropic.ImageBlockSourceMediaType? Type17 { get; set; } + public bool? Type17 { get; set; } /// /// /// - public global::Anthropic.ImageBlockSourceType? Type18 { get; set; } + public global::Anthropic.MessageRole? Type18 { get; set; } /// /// /// - public global::Anthropic.Message? Type19 { get; set; } + public global::Anthropic.StopReason? Type19 { get; set; } /// /// /// - public global::Anthropic.MessageStreamEventType? Type20 { get; set; } + public global::Anthropic.Usage? Type20 { get; set; } /// /// /// - public global::Anthropic.MessageDelta? Type21 { get; set; } + public int? Type21 { get; set; } /// /// /// - public global::Anthropic.MessageDeltaUsage? Type22 { get; set; } + public global::Anthropic.CreateMessageRequestMetadata? Type22 { get; set; } /// /// /// - public global::System.OneOf? Type23 { get; set; } + public global::System.Collections.Generic.IList? Type23 { get; set; } /// /// /// - public global::System.OneOf? Type24 { get; set; } + public double? Type24 { get; set; } /// /// /// - public global::Anthropic.CreateMessageRequest? Type25 { get; set; } + public global::Anthropic.ToolChoice? Type25 { get; set; } + /// + /// + /// + public global::Anthropic.ToolChoiceType? Type26 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type27 { get; set; } + /// + /// + /// + public global::Anthropic.Tool? Type28 { get; set; } + /// + /// + /// + public global::Anthropic.ToolInputSchema? Type29 { get; set; } + /// + /// + /// + public global::Anthropic.MessageStreamEvent? Type30 { get; set; } + /// + /// + /// + public global::Anthropic.MessageStartEvent? Type31 { get; set; } + /// + /// + /// + public global::Anthropic.MessageStreamEventType? Type32 { get; set; } + /// + /// + /// + public global::Anthropic.MessageDeltaEvent? Type33 { get; set; } + /// + /// + /// + public global::Anthropic.MessageDelta? Type34 { get; set; } + /// + /// + /// + public global::Anthropic.MessageDeltaUsage? Type35 { get; set; } + /// + /// + /// + public global::Anthropic.MessageStopEvent? Type36 { get; set; } + /// + /// + /// + public global::Anthropic.ContentBlockStartEvent? Type37 { get; set; } + /// + /// + /// + public global::Anthropic.ContentBlockDeltaEvent? Type38 { get; set; } + /// + /// + /// + public global::Anthropic.BlockDelta? Type39 { get; set; } + /// + /// + /// + public global::Anthropic.TextBlockDelta? Type40 { get; set; } + /// + /// + /// + public global::Anthropic.InputJsonBlockDelta? Type41 { get; set; } + /// + /// + /// + public global::Anthropic.ContentBlockStopEvent? Type42 { get; set; } + /// + /// + /// + public global::Anthropic.PingEvent? Type43 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Anthropic/Generated/OneOf.4.g.cs b/src/libs/Anthropic/Generated/OneOf.4.g.cs deleted file mode 100644 index d783402..0000000 --- a/src/libs/Anthropic/Generated/OneOf.4.g.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System.Linq; - -#nullable enable - -namespace System -{ - /// - /// - /// - public readonly partial struct OneOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? Value1 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] -#endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// - public static implicit operator OneOf(T1 value) => new OneOf(value); - - /// - /// - /// - public static implicit operator T1?(OneOf @this) => @this.Value1; - - /// - /// - /// - public OneOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - - /// - /// - /// - public static implicit operator OneOf(T2 value) => new OneOf(value); - - /// - /// - /// - public static implicit operator T2?(OneOf @this) => @this.Value2; - - /// - /// - /// - public OneOf(T2? value) - { - Value2 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T3? Value3 { get; init; } -#else - public T3? Value3 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; - - /// - /// - /// - public static implicit operator OneOf(T3 value) => new OneOf(value); - - /// - /// - /// - public static implicit operator T3?(OneOf @this) => @this.Value3; - - /// - /// - /// - public OneOf(T3? value) - { - Value3 = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public T4? Value4 { get; init; } -#else - public T4? Value4 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] -#endif - public bool IsValue4 => Value4 != null; - - /// - /// - /// - public static implicit operator OneOf(T4 value) => new OneOf(value); - - /// - /// - /// - public static implicit operator T4?(OneOf @this) => @this.Value4; - - /// - /// - /// - public OneOf(T4? value) - { - Value4 = value; - } - - /// - /// - /// - public OneOf( - T1? value1, - T2? value2, - T3? value3, - T4? value4 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - } - - /// - /// - /// - public object? Object => - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4; - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(T1), - Value2, - typeof(T2), - Value3, - typeof(T3), - Value4, - typeof(T4), - }; - 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 fields.Aggregate(offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(OneOf other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) - ; - } - - /// - /// - /// - public static bool operator ==(OneOf obj1, OneOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(OneOf obj1, OneOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is OneOf o && Equals(o); - } - } -}