diff --git a/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs
index eff5dd73..ba37e995 100644
--- a/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs
@@ -28,37 +28,36 @@ namespace tryAGI.OpenAI
///
///
///
- public static implicit operator AllOf(T1 value) => new AllOf((T1?)value);
+#if NET6_0_OR_GREATER
+ public T2? Value2 { get; init; }
+#else
+ public T2? Value2 { get; }
+#endif
///
///
///
- public static implicit operator T1?(AllOf @this) => @this.Value1;
-
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
+#endif
+ public bool IsValue2 => Value2 != null;
///
///
///
- public AllOf(T1? value)
- {
- Value1 = value;
- }
+ public static implicit operator AllOf(T1 value) => new AllOf((T1?)value);
///
///
///
-#if NET6_0_OR_GREATER
- public T2? Value2 { get; init; }
-#else
- public T2? Value2 { get; }
-#endif
+ public static implicit operator T1?(AllOf @this) => @this.Value1;
///
///
///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
-#endif
- public bool IsValue2 => Value2 != null;
+ public AllOf(T1? value)
+ {
+ Value1 = value;
+ }
///
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.Json.g.cs
deleted file mode 100644
index 411096bb..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- public readonly partial struct AnyOf
- {
- ///
- /// 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::tryAGI.OpenAI.AnyOf? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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::tryAGI.OpenAI.AnyOf? 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::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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/tryAGI.OpenAI/Generated/AnyOf.1.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.g.cs
deleted file mode 100644
index b5503c52..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.1.g.cs
+++ /dev/null
@@ -1,159 +0,0 @@
-
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- ///
- ///
- ///
- public readonly partial struct AnyOf : 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 AnyOf(T1 value) => new AnyOf((T1?)value);
-
- ///
- ///
- ///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
-
- ///
- ///
- ///
- public AnyOf(T1? value)
- {
- Value1 = value;
- }
-
- ///
- ///
- ///
- public object? Object =>
- Value1 as object
- ;
-
- ///
- ///
- ///
- public override string? ToString() =>
- Value1?.ToString()
- ;
-
- ///
- ///
- ///
- public bool Validate()
- {
- return IsValue1;
- }
-
- ///
- ///
- ///
- public TResult? Match(
- global::System.Func? value1 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1 && value1 != null)
- {
- return value1(Value1!);
- }
-
- return default(TResult);
- }
-
- ///
- ///
- ///
- public void Match(
- global::System.Action? value1 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1)
- {
- value1?.Invoke(Value1!);
- }
- }
-
- ///
- ///
- ///
- public override int GetHashCode()
- {
- var fields = new object?[]
- {
- Value1,
- typeof(T1),
- };
- 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(AnyOf other)
- {
- return
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1)
- ;
- }
-
- ///
- ///
- ///
- public static bool operator ==(AnyOf obj1, AnyOf obj2)
- {
- return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
- }
-
- ///
- ///
- ///
- public static bool operator !=(AnyOf obj1, AnyOf obj2)
- {
- return !(obj1 == obj2);
- }
-
- ///
- ///
- ///
- public override bool Equals(object? obj)
- {
- return obj is AnyOf o && Equals(o);
- }
- }
-}
diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs
index 9f12f4e2..7aaec176 100644
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs
@@ -28,37 +28,36 @@ namespace tryAGI.OpenAI
///
///
///
- public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value);
+#if NET6_0_OR_GREATER
+ public T2? Value2 { get; init; }
+#else
+ public T2? Value2 { get; }
+#endif
///
///
///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
-
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
+#endif
+ public bool IsValue2 => Value2 != null;
///
///
///
- public AnyOf(T1? value)
- {
- Value1 = value;
- }
+ public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value);
///
///
///
-#if NET6_0_OR_GREATER
- public T2? Value2 { get; init; }
-#else
- public T2? Value2 { get; }
-#endif
+ public static implicit operator T1?(AnyOf @this) => @this.Value1;
///
///
///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
-#endif
- public bool IsValue2 => Value2 != null;
+ public AnyOf(T1? value)
+ {
+ Value1 = value;
+ }
///
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs
index e00cf181..8cf51ef1 100644
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/AnyOf.3.g.cs
@@ -28,72 +28,71 @@ namespace tryAGI.OpenAI
///
///
///
- public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value);
-
- ///
- ///
- ///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
+#if NET6_0_OR_GREATER
+ public T2? Value2 { get; init; }
+#else
+ public T2? Value2 { get; }
+#endif
///
///
///
- public AnyOf(T1? value)
- {
- Value1 = value;
- }
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
+#endif
+ public bool IsValue2 => Value2 != null;
///
///
///
#if NET6_0_OR_GREATER
- public T2? Value2 { get; init; }
+ public T3? Value3 { get; init; }
#else
- public T2? Value2 { get; }
+ public T3? Value3 { get; }
#endif
///
///
///
#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))]
#endif
- public bool IsValue2 => Value2 != null;
-
+ public bool IsValue3 => Value3 != null;
///
///
///
- public static implicit operator AnyOf(T2 value) => new AnyOf((T2?)value);
+ public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value);
///
///
///
- public static implicit operator T2?(AnyOf @this) => @this.Value2;
+ public static implicit operator T1?(AnyOf @this) => @this.Value1;
///
///
///
- public AnyOf(T2? value)
+ public AnyOf(T1? value)
{
- Value2 = value;
+ Value1 = value;
}
///
///
///
-#if NET6_0_OR_GREATER
- public T3? Value3 { get; init; }
-#else
- public T3? Value3 { get; }
-#endif
+ public static implicit operator AnyOf(T2 value) => new AnyOf((T2?)value);
///
///
///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))]
-#endif
- public bool IsValue3 => Value3 != null;
+ public static implicit operator T2?(AnyOf @this) => @this.Value2;
+
+ ///
+ ///
+ ///
+ public AnyOf(T2? value)
+ {
+ Value2 = value;
+ }
///
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.Json.g.cs
deleted file mode 100644
index a00313dc..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- public readonly partial struct AnyOf
- {
- ///
- /// 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::tryAGI.OpenAI.AnyOf? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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::tryAGI.OpenAI.AnyOf? 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::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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/tryAGI.OpenAI/Generated/AnyOf.4.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.g.cs
deleted file mode 100644
index e1576318..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.4.g.cs
+++ /dev/null
@@ -1,325 +0,0 @@
-
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- ///
- ///
- ///
- public readonly partial struct AnyOf : 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 AnyOf(T1 value) => new AnyOf((T1?)value);
-
- ///
- ///
- ///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T2 value) => new AnyOf((T2?)value);
-
- ///
- ///
- ///
- public static implicit operator T2?(AnyOf @this) => @this.Value2;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T3 value) => new AnyOf((T3?)value);
-
- ///
- ///
- ///
- public static implicit operator T3?(AnyOf @this) => @this.Value3;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T4 value) => new AnyOf((T4?)value);
-
- ///
- ///
- ///
- public static implicit operator T4?(AnyOf @this) => @this.Value4;
-
- ///
- ///
- ///
- public AnyOf(T4? value)
- {
- Value4 = value;
- }
-
- ///
- ///
- ///
- public AnyOf(
- 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 override string? ToString() =>
- Value1?.ToString() ??
- Value2?.ToString() ??
- Value3?.ToString() ??
- Value4?.ToString()
- ;
-
- ///
- ///
- ///
- public bool Validate()
- {
- return IsValue1 || IsValue2 || IsValue3 || IsValue4;
- }
-
- ///
- ///
- ///
- public TResult? Match(
- global::System.Func? value1 = null,
- global::System.Func? value2 = null,
- global::System.Func? value3 = null,
- global::System.Func? value4 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1 && value1 != null)
- {
- return value1(Value1!);
- }
- else if (IsValue2 && value2 != null)
- {
- return value2(Value2!);
- }
- else if (IsValue3 && value3 != null)
- {
- return value3(Value3!);
- }
- else if (IsValue4 && value4 != null)
- {
- return value4(Value4!);
- }
-
- return default(TResult);
- }
-
- ///
- ///
- ///
- public void Match(
- global::System.Action? value1 = null,
- global::System.Action? value2 = null,
- global::System.Action? value3 = null,
- global::System.Action? value4 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1)
- {
- value1?.Invoke(Value1!);
- }
- else if (IsValue2)
- {
- value2?.Invoke(Value2!);
- }
- else if (IsValue3)
- {
- value3?.Invoke(Value3!);
- }
- else if (IsValue4)
- {
- value4?.Invoke(Value4!);
- }
- }
-
- ///
- ///
- ///
- 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 global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator);
- }
-
- ///
- ///
- ///
- public bool Equals(AnyOf 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 ==(AnyOf obj1, AnyOf obj2)
- {
- return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
- }
-
- ///
- ///
- ///
- public static bool operator !=(AnyOf obj1, AnyOf obj2)
- {
- return !(obj1 == obj2);
- }
-
- ///
- ///
- ///
- public override bool Equals(object? obj)
- {
- return obj is AnyOf o && Equals(o);
- }
- }
-}
diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.Json.g.cs
deleted file mode 100644
index 2baf5f30..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- public readonly partial struct AnyOf
- {
- ///
- /// 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::tryAGI.OpenAI.AnyOf? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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::tryAGI.OpenAI.AnyOf? 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::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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/tryAGI.OpenAI/Generated/AnyOf.5.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.g.cs
deleted file mode 100644
index 6ecace0c..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.5.g.cs
+++ /dev/null
@@ -1,377 +0,0 @@
-
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- ///
- ///
- ///
- public readonly partial struct AnyOf : 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 AnyOf(T1 value) => new AnyOf((T1?)value);
-
- ///
- ///
- ///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T2 value) => new AnyOf((T2?)value);
-
- ///
- ///
- ///
- public static implicit operator T2?(AnyOf @this) => @this.Value2;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T3 value) => new AnyOf((T3?)value);
-
- ///
- ///
- ///
- public static implicit operator T3?(AnyOf @this) => @this.Value3;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T4 value) => new AnyOf((T4?)value);
-
- ///
- ///
- ///
- public static implicit operator T4?(AnyOf @this) => @this.Value4;
-
- ///
- ///
- ///
- public AnyOf(T4? value)
- {
- Value4 = value;
- }
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- public T5? Value5 { get; init; }
-#else
- public T5? Value5 { get; }
-#endif
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))]
-#endif
- public bool IsValue5 => Value5 != null;
-
- ///
- ///
- ///
- public static implicit operator AnyOf(T5 value) => new AnyOf((T5?)value);
-
- ///
- ///
- ///
- public static implicit operator T5?(AnyOf @this) => @this.Value5;
-
- ///
- ///
- ///
- public AnyOf(T5? value)
- {
- Value5 = value;
- }
-
- ///
- ///
- ///
- public AnyOf(
- T1? value1,
- T2? value2,
- T3? value3,
- T4? value4,
- T5? value5
- )
- {
- Value1 = value1;
- Value2 = value2;
- Value3 = value3;
- Value4 = value4;
- Value5 = value5;
- }
-
- ///
- ///
- ///
- public object? Object =>
- Value5 as object ??
- Value4 as object ??
- Value3 as object ??
- Value2 as object ??
- Value1 as object
- ;
-
- ///
- ///
- ///
- public override string? ToString() =>
- Value1?.ToString() ??
- Value2?.ToString() ??
- Value3?.ToString() ??
- Value4?.ToString() ??
- Value5?.ToString()
- ;
-
- ///
- ///
- ///
- public bool Validate()
- {
- return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5;
- }
-
- ///
- ///
- ///
- public TResult? Match(
- global::System.Func? value1 = null,
- global::System.Func? value2 = null,
- global::System.Func? value3 = null,
- global::System.Func? value4 = null,
- global::System.Func? value5 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1 && value1 != null)
- {
- return value1(Value1!);
- }
- else if (IsValue2 && value2 != null)
- {
- return value2(Value2!);
- }
- else if (IsValue3 && value3 != null)
- {
- return value3(Value3!);
- }
- else if (IsValue4 && value4 != null)
- {
- return value4(Value4!);
- }
- else if (IsValue5 && value5 != null)
- {
- return value5(Value5!);
- }
-
- return default(TResult);
- }
-
- ///
- ///
- ///
- public void Match(
- global::System.Action? value1 = null,
- global::System.Action? value2 = null,
- global::System.Action? value3 = null,
- global::System.Action? value4 = null,
- global::System.Action? value5 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1)
- {
- value1?.Invoke(Value1!);
- }
- else if (IsValue2)
- {
- value2?.Invoke(Value2!);
- }
- else if (IsValue3)
- {
- value3?.Invoke(Value3!);
- }
- else if (IsValue4)
- {
- value4?.Invoke(Value4!);
- }
- else if (IsValue5)
- {
- value5?.Invoke(Value5!);
- }
- }
-
- ///
- ///
- ///
- public override int GetHashCode()
- {
- var fields = new object?[]
- {
- Value1,
- typeof(T1),
- Value2,
- typeof(T2),
- Value3,
- typeof(T3),
- Value4,
- typeof(T4),
- Value5,
- typeof(T5),
- };
- 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(AnyOf 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) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5)
- ;
- }
-
- ///
- ///
- ///
- public static bool operator ==(AnyOf obj1, AnyOf obj2)
- {
- return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
- }
-
- ///
- ///
- ///
- public static bool operator !=(AnyOf obj1, AnyOf obj2)
- {
- return !(obj1 == obj2);
- }
-
- ///
- ///
- ///
- public override bool Equals(object? obj)
- {
- return obj is AnyOf o && Equals(o);
- }
- }
-}
diff --git a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.Json.g.cs
deleted file mode 100644
index a81b9a2d..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- public readonly partial struct AnyOf
- {
- ///
- /// 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::tryAGI.OpenAI.AnyOf? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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::tryAGI.OpenAI.AnyOf? 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::tryAGI.OpenAI.AnyOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.AnyOf?;
- }
-
- ///
- /// 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/tryAGI.OpenAI/Generated/AnyOf.6.g.cs b/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.g.cs
deleted file mode 100644
index 450470b4..00000000
--- a/src/libs/tryAGI.OpenAI/Generated/AnyOf.6.g.cs
+++ /dev/null
@@ -1,429 +0,0 @@
-
-#nullable enable
-
-namespace tryAGI.OpenAI
-{
- ///
- ///
- ///
- public readonly partial struct AnyOf : 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 AnyOf(T1 value) => new AnyOf((T1?)value);
-
- ///
- ///
- ///
- public static implicit operator T1?(AnyOf @this) => @this.Value1;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T2 value) => new AnyOf((T2?)value);
-
- ///
- ///
- ///
- public static implicit operator T2?(AnyOf @this) => @this.Value2;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T3 value) => new AnyOf((T3?)value);
-
- ///
- ///
- ///
- public static implicit operator T3?(AnyOf @this) => @this.Value3;
-
- ///
- ///
- ///
- public AnyOf(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 AnyOf(T4 value) => new AnyOf((T4?)value);
-
- ///
- ///
- ///
- public static implicit operator T4?(AnyOf @this) => @this.Value4;
-
- ///
- ///
- ///
- public AnyOf(T4? value)
- {
- Value4 = value;
- }
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- public T5? Value5 { get; init; }
-#else
- public T5? Value5 { get; }
-#endif
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))]
-#endif
- public bool IsValue5 => Value5 != null;
-
- ///
- ///
- ///
- public static implicit operator AnyOf(T5 value) => new AnyOf((T5?)value);
-
- ///
- ///
- ///
- public static implicit operator T5?(AnyOf @this) => @this.Value5;
-
- ///
- ///
- ///
- public AnyOf(T5? value)
- {
- Value5 = value;
- }
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- public T6? Value6 { get; init; }
-#else
- public T6? Value6 { get; }
-#endif
-
- ///
- ///
- ///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))]
-#endif
- public bool IsValue6 => Value6 != null;
-
- ///
- ///
- ///
- public static implicit operator AnyOf(T6 value) => new AnyOf((T6?)value);
-
- ///
- ///
- ///
- public static implicit operator T6?(AnyOf @this) => @this.Value6;
-
- ///
- ///
- ///
- public AnyOf(T6? value)
- {
- Value6 = value;
- }
-
- ///
- ///
- ///
- public AnyOf(
- T1? value1,
- T2? value2,
- T3? value3,
- T4? value4,
- T5? value5,
- T6? value6
- )
- {
- Value1 = value1;
- Value2 = value2;
- Value3 = value3;
- Value4 = value4;
- Value5 = value5;
- Value6 = value6;
- }
-
- ///
- ///
- ///
- public object? Object =>
- Value6 as object ??
- Value5 as object ??
- Value4 as object ??
- Value3 as object ??
- Value2 as object ??
- Value1 as object
- ;
-
- ///
- ///
- ///
- public override string? ToString() =>
- Value1?.ToString() ??
- Value2?.ToString() ??
- Value3?.ToString() ??
- Value4?.ToString() ??
- Value5?.ToString() ??
- Value6?.ToString()
- ;
-
- ///
- ///
- ///
- public bool Validate()
- {
- return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6;
- }
-
- ///
- ///
- ///
- public TResult? Match(
- global::System.Func? value1 = null,
- global::System.Func? value2 = null,
- global::System.Func? value3 = null,
- global::System.Func? value4 = null,
- global::System.Func? value5 = null,
- global::System.Func? value6 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1 && value1 != null)
- {
- return value1(Value1!);
- }
- else if (IsValue2 && value2 != null)
- {
- return value2(Value2!);
- }
- else if (IsValue3 && value3 != null)
- {
- return value3(Value3!);
- }
- else if (IsValue4 && value4 != null)
- {
- return value4(Value4!);
- }
- else if (IsValue5 && value5 != null)
- {
- return value5(Value5!);
- }
- else if (IsValue6 && value6 != null)
- {
- return value6(Value6!);
- }
-
- return default(TResult);
- }
-
- ///
- ///
- ///
- public void Match(
- global::System.Action? value1 = null,
- global::System.Action? value2 = null,
- global::System.Action? value3 = null,
- global::System.Action? value4 = null,
- global::System.Action? value5 = null,
- global::System.Action? value6 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (IsValue1)
- {
- value1?.Invoke(Value1!);
- }
- else if (IsValue2)
- {
- value2?.Invoke(Value2!);
- }
- else if (IsValue3)
- {
- value3?.Invoke(Value3!);
- }
- else if (IsValue4)
- {
- value4?.Invoke(Value4!);
- }
- else if (IsValue5)
- {
- value5?.Invoke(Value5!);
- }
- else if (IsValue6)
- {
- value6?.Invoke(Value6!);
- }
- }
-
- ///
- ///
- ///
- public override int GetHashCode()
- {
- var fields = new object?[]
- {
- Value1,
- typeof(T1),
- Value2,
- typeof(T2),
- Value3,
- typeof(T3),
- Value4,
- typeof(T4),
- Value5,
- typeof(T5),
- Value6,
- typeof(T6),
- };
- 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(AnyOf 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) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6)
- ;
- }
-
- ///
- ///
- ///
- public static bool operator ==(AnyOf obj1, AnyOf obj2)
- {
- return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2);
- }
-
- ///
- ///
- ///
- public static bool operator !=(AnyOf obj1, AnyOf obj2)
- {
- return !(obj1 == obj2);
- }
-
- ///
- ///
- ///
- public override bool Equals(object? obj)
- {
- return obj is AnyOf o && Equals(o);
- }
- }
-}
diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs
index df9b1a28..23c85365 100644
--- a/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.2.g.cs
@@ -28,37 +28,36 @@ namespace tryAGI.OpenAI
///
///
///
- public static implicit operator OneOf(T1 value) => new OneOf((T1?)value);
+#if NET6_0_OR_GREATER
+ public T2? Value2 { get; init; }
+#else
+ public T2? Value2 { get; }
+#endif
///
///
///
- public static implicit operator T1?(OneOf @this) => @this.Value1;
-
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
+#endif
+ public bool IsValue2 => Value2 != null;
///
///
///
- public OneOf(T1? value)
- {
- Value1 = value;
- }
+ public static implicit operator OneOf(T1 value) => new OneOf((T1?)value);
///
///
///
-#if NET6_0_OR_GREATER
- public T2? Value2 { get; init; }
-#else
- public T2? Value2 { get; }
-#endif
+ public static implicit operator T1?(OneOf @this) => @this.Value1;
///
///
///
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
-#endif
- public bool IsValue2 => Value2 != null;
+ public OneOf(T1? value)
+ {
+ Value1 = value;
+ }
///
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.3.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.Json.g.cs
new file mode 100644
index 00000000..7d583374
--- /dev/null
+++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace tryAGI.OpenAI
+{
+ public readonly partial struct OneOf
+ {
+ ///
+ /// 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::tryAGI.OpenAI.OneOf? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::tryAGI.OpenAI.OneOf),
+ jsonSerializerContext) as global::tryAGI.OpenAI.OneOf?;
+ }
+
+ ///
+ /// 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::tryAGI.OpenAI.OneOf? 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::tryAGI.OpenAI.OneOf),
+ jsonSerializerContext).ConfigureAwait(false)) as global::tryAGI.OpenAI.OneOf?;
+ }
+
+ ///
+ /// 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/tryAGI.OpenAI/Generated/OneOf.3.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.g.cs
new file mode 100644
index 00000000..4ad02ec9
--- /dev/null
+++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.3.g.cs
@@ -0,0 +1,272 @@
+
+#nullable enable
+
+namespace tryAGI.OpenAI
+{
+ ///
+ ///
+ ///
+ 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;
+
+ ///
+ ///
+ ///
+#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;
+
+ ///
+ ///
+ ///
+#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(T1 value) => new OneOf((T1?)value);
+
+ ///
+ ///
+ ///
+ public static implicit operator T1?(OneOf @this) => @this.Value1;
+
+ ///
+ ///
+ ///
+ public OneOf(T1? value)
+ {
+ Value1 = value;
+ }
+
+ ///
+ ///
+ ///
+ public static implicit operator OneOf(T2 value) => new OneOf((T2?)value);
+
+ ///
+ ///
+ ///
+ public static implicit operator T2?(OneOf @this) => @this.Value2;
+
+ ///
+ ///
+ ///
+ public OneOf(T2? value)
+ {
+ Value2 = value;
+ }
+
+ ///
+ ///
+ ///
+ public static implicit operator OneOf(T3 value) => new OneOf((T3?)value);
+
+ ///
+ ///
+ ///
+ public static implicit operator T3?(OneOf @this) => @this.Value3;
+
+ ///
+ ///
+ ///
+ public OneOf(T3? value)
+ {
+ Value3 = value;
+ }
+
+ ///
+ ///
+ ///
+ public OneOf(
+ T1? value1,
+ T2? value2,
+ T3? value3
+ )
+ {
+ Value1 = value1;
+ Value2 = value2;
+ Value3 = value3;
+ }
+
+ ///
+ ///
+ ///
+ public object? Object =>
+ Value3 as object ??
+ Value2 as object ??
+ Value1 as object
+ ;
+
+ ///
+ ///
+ ///
+ public override string? ToString() =>
+ Value1?.ToString() ??
+ Value2?.ToString() ??
+ Value3?.ToString()
+ ;
+
+ ///
+ ///
+ ///
+ public bool Validate()
+ {
+ return IsValue1 && !IsValue2 && !IsValue3 || !IsValue1 && IsValue2 && !IsValue3 || !IsValue1 && !IsValue2 && IsValue3;
+ }
+
+ ///
+ ///
+ ///
+ public TResult? Match(
+ global::System.Func? value1 = null,
+ global::System.Func? value2 = null,
+ global::System.Func? value3 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1 && value1 != null)
+ {
+ return value1(Value1!);
+ }
+ else if (IsValue2 && value2 != null)
+ {
+ return value2(Value2!);
+ }
+ else if (IsValue3 && value3 != null)
+ {
+ return value3(Value3!);
+ }
+
+ return default(TResult);
+ }
+
+ ///
+ ///
+ ///
+ public void Match(
+ global::System.Action? value1 = null,
+ global::System.Action? value2 = null,
+ global::System.Action? value3 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1)
+ {
+ value1?.Invoke(Value1!);
+ }
+ else if (IsValue2)
+ {
+ value2?.Invoke(Value2!);
+ }
+ else if (IsValue3)
+ {
+ value3?.Invoke(Value3!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public override int GetHashCode()
+ {
+ var fields = new object?[]
+ {
+ Value1,
+ typeof(T1),
+ Value2,
+ typeof(T2),
+ Value3,
+ typeof(T3),
+ };
+ 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(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)
+ ;
+ }
+
+ ///
+ ///
+ ///
+ 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);
+ }
+ }
+}
diff --git a/src/libs/tryAGI.OpenAI/Generated/OneOf.4.Json.g.cs b/src/libs/tryAGI.OpenAI/Generated/OneOf.4.Json.g.cs
new file mode 100644
index 00000000..8d38ba36
--- /dev/null
+++ b/src/libs/tryAGI.OpenAI/Generated/OneOf.4.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace tryAGI.OpenAI
+{
+ public readonly partial struct OneOf
+ {
+ ///