diff --git a/src/cli/Apify.CLI/Apify.CLI.csproj b/src/cli/Apify.CLI/Apify.CLI.csproj
index a5f799f0..c7cc6f44 100644
--- a/src/cli/Apify.CLI/Apify.CLI.csproj
+++ b/src/cli/Apify.CLI/Apify.CLI.csproj
@@ -19,11 +19,11 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
\ No newline at end of file
diff --git a/src/cli/Apify.CLI/Commands/ActorTasksActorTaskPutCommandApiCommand.g.cs b/src/cli/Apify.CLI/Commands/ActorTasksActorTaskPutCommandApiCommand.g.cs
index 1133b18a..b17c7983 100644
--- a/src/cli/Apify.CLI/Commands/ActorTasksActorTaskPutCommandApiCommand.g.cs
+++ b/src/cli/Apify.CLI/Commands/ActorTasksActorTaskPutCommandApiCommand.g.cs
@@ -25,7 +25,7 @@ internal static partial class ActorTasksActorTaskPutCommandApiCommand
Description = @"",
};
- private static Option, object>?> InputOption { get; } = new(
+ private static Option>?> InputOption { get; } = new(
name: @"--input")
{
Description = @"",
diff --git a/src/libs/Apify/Generated/Apify.ActorTasks.JsonSerializerContext.g.cs b/src/libs/Apify/Generated/Apify.ActorTasks.JsonSerializerContext.g.cs
index 21c05c81..111ae4c9 100644
--- a/src/libs/Apify/Generated/Apify.ActorTasks.JsonSerializerContext.g.cs
+++ b/src/libs/Apify/Generated/Apify.ActorTasks.JsonSerializerContext.g.cs
@@ -79,7 +79,7 @@ namespace Apify
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.TaskInput))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.TaskPublicConfig))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.CreateTaskRequest))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf, object>), TypeInfoPropertyName = "AnyOfTaskInputIListTaskInputObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf>), TypeInfoPropertyName = "AnyOfTaskInputIListTaskInput2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.Task))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.TaskResponse))]
@@ -116,7 +116,7 @@ namespace Apify
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.RunOrigin?), TypeInfoPropertyName = "NullableRunOrigin2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.GeneralAccess?), TypeInfoPropertyName = "NullableGeneralAccess2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.ListOfTasks?), TypeInfoPropertyName = "NullableListOfTasks2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf, object>?), TypeInfoPropertyName = "NullableAnyOfTaskInputIListTaskInputObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf>?), TypeInfoPropertyName = "NullableAnyOfTaskInputIListTaskInput2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AllOf?), TypeInfoPropertyName = "NullableAllOfCreateTaskRequestObject2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AllOf?), TypeInfoPropertyName = "NullableAllOfPaginationResponseActorTaskWebhooksGetResponseData2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AllOf?), TypeInfoPropertyName = "NullableAllOfPaginationResponseActorTaskRunsGetResponseData2")]
@@ -125,7 +125,7 @@ namespace Apify
[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::Apify.AnyOf, object>))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
internal sealed partial class ActorTasksSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
@@ -182,9 +182,9 @@ public static void AddConverters(global::System.Text.Json.JsonSerializerOptions
options.Converters.Add(new global::Apify.JsonConverters.ActorRunPricingInfoJsonConverter());
options.Converters.Add(new global::Apify.JsonConverters.ListOfTasksJsonConverter());
options.Converters.Add(new global::Apify.JsonConverters.OneOfJsonConverter());
- options.Converters.Add(new global::Apify.JsonConverters.AnyOfJsonConverter, object>());
- options.Converters.Add(new global::Apify.JsonConverters.AnyOfJsonConverter, object>());
- options.Converters.Add(new global::Apify.JsonConverters.AnyOfJsonConverter, object>());
+ options.Converters.Add(new global::Apify.JsonConverters.AnyOfJsonConverter>());
+ options.Converters.Add(new global::Apify.JsonConverters.AnyOfJsonConverter>());
+ options.Converters.Add(new global::Apify.JsonConverters.AnyOfJsonConverter>());
options.Converters.Add(new global::Apify.JsonConverters.OneOfJsonConverter>());
options.Converters.Add(new global::Apify.JsonConverters.AllOfJsonConverter());
options.Converters.Add(new global::Apify.JsonConverters.AllOfJsonConverter());
diff --git a/src/libs/Apify/Generated/Apify.ActorTasksClient.ActorTaskPut.g.cs b/src/libs/Apify/Generated/Apify.ActorTasksClient.ActorTaskPut.g.cs
index 5844ba89..c159e94d 100644
--- a/src/libs/Apify/Generated/Apify.ActorTasksClient.ActorTaskPut.g.cs
+++ b/src/libs/Apify/Generated/Apify.ActorTasksClient.ActorTaskPut.g.cs
@@ -870,7 +870,7 @@ partial void ProcessActorTaskPutResponseContent(
string actorTaskId,
string? name = default,
global::Apify.TaskOptions? options = default,
- global::Apify.AnyOf, object>? input = default,
+ global::Apify.AnyOf>? input = default,
string? title = default,
string? description = default,
global::Apify.ActorStandby? actorStandby = default,
diff --git a/src/libs/Apify/Generated/Apify.AnyOf.3.Json.g.cs b/src/libs/Apify/Generated/Apify.AnyOf.3.Json.g.cs
deleted file mode 100644
index a60125a6..00000000
--- a/src/libs/Apify/Generated/Apify.AnyOf.3.Json.g.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-#nullable enable
-
-namespace Apify
-{
- 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 generated default JsonSerializerContext.
- ///
- public string ToJson()
- {
- return ToJson(global::Apify.SourceGenerationContext.Default);
- }
-
- ///
- /// 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)
- {
- if (jsonSerializerOptions is null)
- {
- return ToJson(global::Apify.SourceGenerationContext.Default);
- }
-
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Apify.AnyOf? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Apify.AnyOf),
- jsonSerializerContext) as global::Apify.AnyOf?;
- }
-
- ///
- /// Deserializes a JSON string using the generated default JsonSerializerContext.
- ///
- public static global::Apify.AnyOf? FromJson(
- string json)
- {
- return FromJson(
- json,
- global::Apify.SourceGenerationContext.Default);
- }
-
- ///
- /// 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::Apify.AnyOf? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- if (jsonSerializerOptions is null)
- {
- return FromJson(
- json,
- global::Apify.SourceGenerationContext.Default);
- }
-
- 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::Apify.AnyOf),
- jsonSerializerContext).ConfigureAwait(false)) as global::Apify.AnyOf?;
- }
-
- ///
- /// Deserializes a JSON stream using the generated default JsonSerializerContext.
- ///
- public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync(
- global::System.IO.Stream jsonStream)
- {
- return FromJsonStreamAsync(
- jsonStream,
- global::Apify.SourceGenerationContext.Default);
- }
-
- ///
- /// 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)
- {
- if (jsonSerializerOptions is null)
- {
- return FromJsonStreamAsync(
- jsonStream,
- global::Apify.SourceGenerationContext.Default);
- }
-
- return global::System.Text.Json.JsonSerializer.DeserializeAsync?>(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/Apify/Generated/Apify.AnyOf.3.g.cs b/src/libs/Apify/Generated/Apify.AnyOf.3.g.cs
deleted file mode 100644
index d87c7906..00000000
--- a/src/libs/Apify/Generated/Apify.AnyOf.3.g.cs
+++ /dev/null
@@ -1,377 +0,0 @@
-
-#nullable enable
-
-namespace Apify
-{
- ///
- ///
- ///
- 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 bool TryPickValue1(
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
-#endif
- out T1? value)
- {
- value = Value1;
- return IsValue1;
- }
-
- ///
- ///
- ///
- public T1 PickValue1() => Value1 is { } value
- ? value
- : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}.");
-
- ///
- ///
- ///
-#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 bool TryPickValue2(
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
-#endif
- out T2? value)
- {
- value = Value2;
- return IsValue2;
- }
-
- ///
- ///
- ///
- public T2 PickValue2() => Value2 is { } value
- ? value
- : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}.");
-
- ///
- ///
- ///
-#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 bool TryPickValue3(
-#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
-#endif
- out T3? value)
- {
- value = Value3;
- return IsValue3;
- }
-
- ///
- ///
- ///
- public T3 PickValue3() => Value3 is { } value
- ? value
- : throw new global::System.InvalidOperationException($"Expected union variant 'Value3' but the value was {ToString()}.");
- ///
- ///
- ///
- 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 static AnyOf FromValue1(T1? value) => new AnyOf(value);
-
- ///
- ///
- ///
- 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;
- }
-
- ///
- ///
- ///
- public static AnyOf FromValue2(T2? value) => new AnyOf(value);
-
- ///
- ///
- ///
- 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;
- }
-
- ///
- ///
- ///
- public static AnyOf FromValue3(T3? value) => new AnyOf(value);
-
- ///
- ///
- ///
- public AnyOf(
- 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;
- }
-
- ///
- ///
- ///
- 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 (Value1 is { } __value0 && value1 != null)
- {
- return value1(__value0);
- }
- else if (Value2 is { } __value1 && value2 != null)
- {
- return value2(__value1);
- }
- else if (Value3 is { } __value2 && value3 != null)
- {
- return value3(__value2);
- }
-
- 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 (Value1 is { } __value0)
- {
- value1?.Invoke(__value0);
- }
- else if (Value2 is { } __value1)
- {
- value2?.Invoke(__value1);
- }
- else if (Value3 is { } __value2)
- {
- value3?.Invoke(__value2);
- }
- }
-
- ///
- ///
- ///
- public void Switch(
- global::System.Action? value1 = null,
- global::System.Action? value2 = null,
- global::System.Action? value3 = null,
- bool validate = true)
- {
- if (validate)
- {
- Validate();
- }
-
- if (Value1 is { } __value0)
- {
- value1?.Invoke(__value0);
- }
- else if (Value2 is { } __value1)
- {
- value2?.Invoke(__value1);
- }
- else if (Value3 is { } __value2)
- {
- value3?.Invoke(__value2);
- }
- }
-
- ///
- ///
- ///
- 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(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)
- ;
- }
-
- ///
- ///
- ///
- 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/Apify/Generated/Apify.IActorTasksClient.ActorTaskPut.g.cs b/src/libs/Apify/Generated/Apify.IActorTasksClient.ActorTaskPut.g.cs
index 3bbd44e5..41b5ecbe 100644
--- a/src/libs/Apify/Generated/Apify.IActorTasksClient.ActorTaskPut.g.cs
+++ b/src/libs/Apify/Generated/Apify.IActorTasksClient.ActorTaskPut.g.cs
@@ -129,7 +129,7 @@ public partial interface IActorTasksClient
string actorTaskId,
string? name = default,
global::Apify.TaskOptions? options = default,
- global::Apify.AnyOf, object>? input = default,
+ global::Apify.AnyOf>? input = default,
string? title = default,
string? description = default,
global::Apify.ActorStandby? actorStandby = default,
diff --git a/src/libs/Apify/Generated/Apify.JsonConverters.AnyOf3.g.cs b/src/libs/Apify/Generated/Apify.JsonConverters.AnyOf3.g.cs
deleted file mode 100644
index 09a60b24..00000000
--- a/src/libs/Apify/Generated/Apify.JsonConverters.AnyOf3.g.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-#nullable enable
-
-namespace Apify.JsonConverters
-{
- ///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
- {
- ///
- public override global::Apify.AnyOf 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.");
-
-
- using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
- var __rawJson = __jsonDocument.RootElement.GetRawText();
- var __jsonProps = new global::System.Collections.Generic.HashSet();
- if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
- {
- foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
- {
- __jsonProps.Add(__jsonProp.Name);
- }
- }
-
- var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
- var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
- var __score2 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score2++;
- }
- }
- }
- var __bestScore = 0;
- var __bestIndex = -1;
- if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
- if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
- if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; }
-
- T1? value1 = default;
- T2? value2 = default;
- T3? value3 = default;
- if (__bestIndex >= 0)
- {
- if (__bestIndex == 0)
- {
- 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(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- else if (__bestIndex == 1)
- {
- 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(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- else if (__bestIndex == 2)
- {
- 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(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
- }
-
- if (value1 == null && value2 == null && value3 == null)
- {
- 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(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- if (value1 == null && value2 == null && value3 == null)
- {
- 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(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- if (value1 == null && value2 == null && value3 == null)
- {
- 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(__rawJson, typeInfo);
- }
- catch (global::System.Text.Json.JsonException)
- {
- }
- catch (global::System.InvalidOperationException)
- {
- }
- }
-
- var __value = new global::Apify.AnyOf(
- value1,
-
- value2,
-
- value3
- );
-
- return __value;
- }
-
- ///
- public override void Write(
- global::System.Text.Json.Utf8JsonWriter writer,
- global::Apify.AnyOf 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.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.PickValue1(), 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.PickValue2(), 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.PickValue3(), typeInfo);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/libs/Apify/Generated/Apify.JsonSerializerContext.g.cs b/src/libs/Apify/Generated/Apify.JsonSerializerContext.g.cs
index 4f481806..d5c254ed 100644
--- a/src/libs/Apify/Generated/Apify.JsonSerializerContext.g.cs
+++ b/src/libs/Apify/Generated/Apify.JsonSerializerContext.g.cs
@@ -211,11 +211,11 @@ namespace Apify
typeof(global::Apify.JsonConverters.OneOfJsonConverter),
- typeof(global::Apify.JsonConverters.AnyOfJsonConverter, object>),
+ typeof(global::Apify.JsonConverters.AnyOfJsonConverter>),
- typeof(global::Apify.JsonConverters.AnyOfJsonConverter, object>),
+ typeof(global::Apify.JsonConverters.AnyOfJsonConverter>),
- typeof(global::Apify.JsonConverters.AnyOfJsonConverter, object>),
+ typeof(global::Apify.JsonConverters.AnyOfJsonConverter>),
typeof(global::Apify.JsonConverters.OneOfJsonConverter>),
@@ -458,7 +458,7 @@ namespace Apify
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.TaskInput))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.TaskPublicConfig))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.CreateTaskRequest))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf, object>), TypeInfoPropertyName = "AnyOfTaskInputIListTaskInputObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf>), TypeInfoPropertyName = "AnyOfTaskInputIListTaskInput2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.Task))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.TaskResponse))]
@@ -637,7 +637,7 @@ namespace Apify
[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::Apify.AnyOf, object>))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Apify.AnyOf>))]
[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))]
diff --git a/src/libs/Apify/Generated/Apify.JsonSerializerContextTypes.g.cs b/src/libs/Apify/Generated/Apify.JsonSerializerContextTypes.g.cs
index dc9e9548..aabb37b2 100644
--- a/src/libs/Apify/Generated/Apify.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Apify/Generated/Apify.JsonSerializerContextTypes.g.cs
@@ -841,7 +841,7 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Apify.AnyOf, object>? Type202 { get; set; }
+ public global::Apify.AnyOf>? Type202 { get; set; }
///
///
///
@@ -1558,7 +1558,7 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Apify.AnyOf, object>? ListType23 { get; set; }
+ public global::Apify.AnyOf>? ListType23 { get; set; }
///
///
///
diff --git a/src/libs/Apify/Generated/Apify.Models.CreateTaskRequest.g.cs b/src/libs/Apify/Generated/Apify.Models.CreateTaskRequest.g.cs
index ef8eb4af..6f79d0ce 100644
--- a/src/libs/Apify/Generated/Apify.Models.CreateTaskRequest.g.cs
+++ b/src/libs/Apify/Generated/Apify.Models.CreateTaskRequest.g.cs
@@ -31,8 +31,8 @@ public sealed partial class CreateTaskRequest
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("input")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Apify.JsonConverters.AnyOfJsonConverter, object>))]
- public global::Apify.AnyOf, object>? Input { get; set; }
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Apify.JsonConverters.AnyOfJsonConverter>))]
+ public global::Apify.AnyOf>? Input { get; set; }
///
///
@@ -86,7 +86,7 @@ public CreateTaskRequest(
string actId,
string? name,
global::Apify.TaskOptions? options,
- global::Apify.AnyOf, object>? input,
+ global::Apify.AnyOf>? input,
string? title,
string? description,
global::Apify.ActorStandby? actorStandby,
diff --git a/src/libs/Apify/Generated/Apify.Models.Task.g.cs b/src/libs/Apify/Generated/Apify.Models.Task.g.cs
index b3bafd8e..72c078d9 100644
--- a/src/libs/Apify/Generated/Apify.Models.Task.g.cs
+++ b/src/libs/Apify/Generated/Apify.Models.Task.g.cs
@@ -78,8 +78,8 @@ public sealed partial class Task
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("input")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Apify.JsonConverters.AnyOfJsonConverter, object>))]
- public global::Apify.AnyOf, object>? Input { get; set; }
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Apify.JsonConverters.AnyOfJsonConverter>))]
+ public global::Apify.AnyOf>? Input { get; set; }
///
///
@@ -159,7 +159,7 @@ public Task(
global::System.DateTime? removedAt,
global::Apify.TaskStats? stats,
global::Apify.TaskOptions? options,
- global::Apify.AnyOf, object>? input,
+ global::Apify.AnyOf>? input,
string? title,
string? description,
global::Apify.ActorStandby? actorStandby,
diff --git a/src/libs/Apify/Generated/Apify.Models.UpdateTaskRequest.g.cs b/src/libs/Apify/Generated/Apify.Models.UpdateTaskRequest.g.cs
index e78ef445..7d534fa9 100644
--- a/src/libs/Apify/Generated/Apify.Models.UpdateTaskRequest.g.cs
+++ b/src/libs/Apify/Generated/Apify.Models.UpdateTaskRequest.g.cs
@@ -24,8 +24,8 @@ public sealed partial class UpdateTaskRequest
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("input")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Apify.JsonConverters.AnyOfJsonConverter, object>))]
- public global::Apify.AnyOf, object>? Input { get; set; }
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Apify.JsonConverters.AnyOfJsonConverter>))]
+ public global::Apify.AnyOf>? Input { get; set; }
///
///
@@ -94,7 +94,7 @@ public sealed partial class UpdateTaskRequest
public UpdateTaskRequest(
string? name,
global::Apify.TaskOptions? options,
- global::Apify.AnyOf, object>? input,
+ global::Apify.AnyOf>? input,
string? title,
string? description,
global::Apify.ActorStandby? actorStandby,