diff --git a/src/libs/Phoenix/Generated/Phoenix.AnyOf.2.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnyOf.2.g.cs
index 189de05..4c56c42 100644
--- a/src/libs/Phoenix/Generated/Phoenix.AnyOf.2.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.AnyOf.2.g.cs
@@ -25,6 +25,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -41,6 +54,19 @@ namespace Phoenix
[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;
+ }
///
///
///
@@ -143,6 +169,30 @@ public bool Validate()
///
public void Match(
global::System.Action? value1 = null,
+
+ global::System.Action? value2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1)
+ {
+ value1?.Invoke(Value1!);
+ }
+ else if (IsValue2)
+ {
+ value2?.Invoke(Value2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
bool validate = true)
{
diff --git a/src/libs/Phoenix/Generated/Phoenix.AnyOf.21.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnyOf.21.g.cs
index 85466c8..b2e5c7c 100644
--- a/src/libs/Phoenix/Generated/Phoenix.AnyOf.21.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.AnyOf.21.g.cs
@@ -25,6 +25,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -76,6 +115,19 @@ namespace Phoenix
#endif
public bool IsValue4 => Value4 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue4(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T4? value)
+ {
+ value = Value4;
+ return IsValue4;
+ }
+
///
///
///
@@ -93,6 +145,19 @@ namespace Phoenix
#endif
public bool IsValue5 => Value5 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue5(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T5? value)
+ {
+ value = Value5;
+ return IsValue5;
+ }
+
///
///
///
@@ -110,6 +175,19 @@ namespace Phoenix
#endif
public bool IsValue6 => Value6 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue6(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T6? value)
+ {
+ value = Value6;
+ return IsValue6;
+ }
+
///
///
///
@@ -127,6 +205,19 @@ namespace Phoenix
#endif
public bool IsValue7 => Value7 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue7(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T7? value)
+ {
+ value = Value7;
+ return IsValue7;
+ }
+
///
///
///
@@ -144,6 +235,19 @@ namespace Phoenix
#endif
public bool IsValue8 => Value8 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue8(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T8? value)
+ {
+ value = Value8;
+ return IsValue8;
+ }
+
///
///
///
@@ -161,6 +265,19 @@ namespace Phoenix
#endif
public bool IsValue9 => Value9 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue9(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T9? value)
+ {
+ value = Value9;
+ return IsValue9;
+ }
+
///
///
///
@@ -178,6 +295,19 @@ namespace Phoenix
#endif
public bool IsValue10 => Value10 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue10(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T10? value)
+ {
+ value = Value10;
+ return IsValue10;
+ }
+
///
///
///
@@ -195,6 +325,19 @@ namespace Phoenix
#endif
public bool IsValue11 => Value11 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue11(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T11? value)
+ {
+ value = Value11;
+ return IsValue11;
+ }
+
///
///
///
@@ -212,6 +355,19 @@ namespace Phoenix
#endif
public bool IsValue12 => Value12 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue12(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T12? value)
+ {
+ value = Value12;
+ return IsValue12;
+ }
+
///
///
///
@@ -229,6 +385,19 @@ namespace Phoenix
#endif
public bool IsValue13 => Value13 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue13(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T13? value)
+ {
+ value = Value13;
+ return IsValue13;
+ }
+
///
///
///
@@ -246,6 +415,19 @@ namespace Phoenix
#endif
public bool IsValue14 => Value14 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue14(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T14? value)
+ {
+ value = Value14;
+ return IsValue14;
+ }
+
///
///
///
@@ -263,6 +445,19 @@ namespace Phoenix
#endif
public bool IsValue15 => Value15 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue15(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T15? value)
+ {
+ value = Value15;
+ return IsValue15;
+ }
+
///
///
///
@@ -280,6 +475,19 @@ namespace Phoenix
#endif
public bool IsValue16 => Value16 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue16(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T16? value)
+ {
+ value = Value16;
+ return IsValue16;
+ }
+
///
///
///
@@ -297,6 +505,19 @@ namespace Phoenix
#endif
public bool IsValue17 => Value17 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue17(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T17? value)
+ {
+ value = Value17;
+ return IsValue17;
+ }
+
///
///
///
@@ -314,6 +535,19 @@ namespace Phoenix
#endif
public bool IsValue18 => Value18 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue18(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T18? value)
+ {
+ value = Value18;
+ return IsValue18;
+ }
+
///
///
///
@@ -331,6 +565,19 @@ namespace Phoenix
#endif
public bool IsValue19 => Value19 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue19(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T19? value)
+ {
+ value = Value19;
+ return IsValue19;
+ }
+
///
///
///
@@ -348,6 +595,19 @@ namespace Phoenix
#endif
public bool IsValue20 => Value20 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue20(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T20? value)
+ {
+ value = Value20;
+ return IsValue20;
+ }
+
///
///
///
@@ -364,6 +624,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value21))]
#endif
public bool IsValue21 => Value21 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue21(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T21? value)
+ {
+ value = Value21;
+ return IsValue21;
+ }
///
///
///
@@ -979,6 +1252,144 @@ public bool Validate()
///
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,
+
+ global::System.Action? value7 = null,
+
+ global::System.Action? value8 = null,
+
+ global::System.Action? value9 = null,
+
+ global::System.Action? value10 = null,
+
+ global::System.Action? value11 = null,
+
+ global::System.Action? value12 = null,
+
+ global::System.Action? value13 = null,
+
+ global::System.Action? value14 = null,
+
+ global::System.Action? value15 = null,
+
+ global::System.Action? value16 = null,
+
+ global::System.Action? value17 = null,
+
+ global::System.Action? value18 = null,
+
+ global::System.Action? value19 = null,
+
+ global::System.Action? value20 = null,
+
+ global::System.Action? value21 = 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!);
+ }
+ else if (IsValue7)
+ {
+ value7?.Invoke(Value7!);
+ }
+ else if (IsValue8)
+ {
+ value8?.Invoke(Value8!);
+ }
+ else if (IsValue9)
+ {
+ value9?.Invoke(Value9!);
+ }
+ else if (IsValue10)
+ {
+ value10?.Invoke(Value10!);
+ }
+ else if (IsValue11)
+ {
+ value11?.Invoke(Value11!);
+ }
+ else if (IsValue12)
+ {
+ value12?.Invoke(Value12!);
+ }
+ else if (IsValue13)
+ {
+ value13?.Invoke(Value13!);
+ }
+ else if (IsValue14)
+ {
+ value14?.Invoke(Value14!);
+ }
+ else if (IsValue15)
+ {
+ value15?.Invoke(Value15!);
+ }
+ else if (IsValue16)
+ {
+ value16?.Invoke(Value16!);
+ }
+ else if (IsValue17)
+ {
+ value17?.Invoke(Value17!);
+ }
+ else if (IsValue18)
+ {
+ value18?.Invoke(Value18!);
+ }
+ else if (IsValue19)
+ {
+ value19?.Invoke(Value19!);
+ }
+ else if (IsValue20)
+ {
+ value20?.Invoke(Value20!);
+ }
+ else if (IsValue21)
+ {
+ value21?.Invoke(Value21!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
global::System.Action? value3 = null,
global::System.Action? value4 = null,
diff --git a/src/libs/Phoenix/Generated/Phoenix.AnyOf.3.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnyOf.3.g.cs
index e0d38ff..0542c8f 100644
--- a/src/libs/Phoenix/Generated/Phoenix.AnyOf.3.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.AnyOf.3.g.cs
@@ -25,6 +25,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -58,6 +84,19 @@ namespace Phoenix
[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;
+ }
///
///
///
@@ -187,6 +226,36 @@ public bool Validate()
///
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 void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
global::System.Action? value3 = null,
bool validate = true)
diff --git a/src/libs/Phoenix/Generated/Phoenix.AnyOf.4.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnyOf.4.g.cs
index 045bbc7..ab27eeb 100644
--- a/src/libs/Phoenix/Generated/Phoenix.AnyOf.4.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.AnyOf.4.g.cs
@@ -25,6 +25,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -75,6 +114,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))]
#endif
public bool IsValue4 => Value4 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue4(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T4? value)
+ {
+ value = Value4;
+ return IsValue4;
+ }
///
///
///
@@ -231,6 +283,42 @@ public bool Validate()
///
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 void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
global::System.Action? value3 = null,
global::System.Action? value4 = null,
diff --git a/src/libs/Phoenix/Generated/Phoenix.AnyOf.7.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnyOf.7.g.cs
index 13196f0..5025c1f 100644
--- a/src/libs/Phoenix/Generated/Phoenix.AnyOf.7.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.AnyOf.7.g.cs
@@ -25,6 +25,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace Phoenix
#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;
+ }
+
///
///
///
@@ -76,6 +115,19 @@ namespace Phoenix
#endif
public bool IsValue4 => Value4 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue4(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T4? value)
+ {
+ value = Value4;
+ return IsValue4;
+ }
+
///
///
///
@@ -93,6 +145,19 @@ namespace Phoenix
#endif
public bool IsValue5 => Value5 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue5(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T5? value)
+ {
+ value = Value5;
+ return IsValue5;
+ }
+
///
///
///
@@ -110,6 +175,19 @@ namespace Phoenix
#endif
public bool IsValue6 => Value6 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue6(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T6? value)
+ {
+ value = Value6;
+ return IsValue6;
+ }
+
///
///
///
@@ -126,6 +204,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))]
#endif
public bool IsValue7 => Value7 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue7(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T7? value)
+ {
+ value = Value7;
+ return IsValue7;
+ }
///
///
///
@@ -363,6 +454,60 @@ public bool Validate()
///
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,
+
+ global::System.Action? value7 = 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!);
+ }
+ else if (IsValue7)
+ {
+ value7?.Invoke(Value7!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
global::System.Action? value3 = null,
global::System.Action? value4 = null,
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.ChatChatPostRoot.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.ChatChatPostRoot.g.cs
index f6f19e1..ed0572f 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.ChatChatPostRoot.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.ChatChatPostRoot.g.cs
@@ -35,6 +35,19 @@ namespace Phoenix
#endif
public bool IsCustom => Custom != null;
+ ///
+ ///
+ ///
+ public bool TryPickCustom(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CustomProviderChatSearchParams? value)
+ {
+ value = Custom;
+ return IsCustom;
+ }
+
///
/// Chat against a Phoenix built-in provider.
/// Credentials and connection details (base URL, Azure endpoint, AWS
@@ -55,6 +68,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Builtin))]
#endif
public bool IsBuiltin => Builtin != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickBuiltin(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.BuiltInProviderChatSearchParams? value)
+ {
+ value = Builtin;
+ return IsBuiltin;
+ }
///
///
///
@@ -134,8 +160,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? custom = null,
- global::System.Func? builtin = null,
+ global::System.Func? custom = null,
+ global::System.Func? builtin = null,
bool validate = true)
{
if (validate)
@@ -159,8 +185,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? custom = null,
- global::System.Action? builtin = null,
+ global::System.Action? custom = null,
+
+ global::System.Action? builtin = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCustom)
+ {
+ custom?.Invoke(Custom!);
+ }
+ else if (IsBuiltin)
+ {
+ builtin?.Invoke(Builtin!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? custom = null,
+ global::System.Action? builtin = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRequest.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRequest.g.cs
index c2ba8b2..c0b9d23 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRequest.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRequest.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsSubmitMessage => SubmitMessage != null;
+ ///
+ ///
+ ///
+ public bool TryPickSubmitMessage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.SubmitMessage? value)
+ {
+ value = SubmitMessage;
+ return IsSubmitMessage;
+ }
+
///
/// Regenerate message extended with Phoenix-specific fields.
///
@@ -47,6 +60,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RegenerateMessage))]
#endif
public bool IsRegenerateMessage => RegenerateMessage != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickRegenerateMessage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.RegenerateMessage? value)
+ {
+ value = RegenerateMessage;
+ return IsRegenerateMessage;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? submitMessage = null,
- global::System.Func? regenerateMessage = null,
+ global::System.Func? submitMessage = null,
+ global::System.Func? regenerateMessage = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? submitMessage = null,
- global::System.Action? regenerateMessage = null,
+ global::System.Action? submitMessage = null,
+
+ global::System.Action? regenerateMessage = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSubmitMessage)
+ {
+ submitMessage?.Invoke(SubmitMessage!);
+ }
+ else if (IsRegenerateMessage)
+ {
+ regenerateMessage?.Invoke(RegenerateMessage!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? submitMessage = null,
+ global::System.Action? regenerateMessage = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRoot.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRoot.g.cs
index 3d3a9aa..4feb6e1 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRoot.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.ChatV2ChatV2PostRoot.g.cs
@@ -35,6 +35,19 @@ namespace Phoenix
#endif
public bool IsCustom => Custom != null;
+ ///
+ ///
+ ///
+ public bool TryPickCustom(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CustomProviderChatSearchParams? value)
+ {
+ value = Custom;
+ return IsCustom;
+ }
+
///
/// Chat against a Phoenix built-in provider.
/// Credentials and connection details (base URL, Azure endpoint, AWS
@@ -55,6 +68,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Builtin))]
#endif
public bool IsBuiltin => Builtin != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickBuiltin(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.BuiltInProviderChatSearchParams? value)
+ {
+ value = Builtin;
+ return IsBuiltin;
+ }
///
///
///
@@ -134,8 +160,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? custom = null,
- global::System.Func? builtin = null,
+ global::System.Func? custom = null,
+ global::System.Func? builtin = null,
bool validate = true)
{
if (validate)
@@ -159,8 +185,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? custom = null,
- global::System.Action? builtin = null,
+ global::System.Action? custom = null,
+
+ global::System.Action? builtin = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCustom)
+ {
+ custom?.Invoke(Custom!);
+ }
+ else if (IsBuiltin)
+ {
+ builtin?.Invoke(Builtin!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? custom = null,
+ global::System.Action? builtin = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.ContentVariant2Item.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.ContentVariant2Item.g.cs
index 6b62031..3739d34 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.ContentVariant2Item.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.ContentVariant2Item.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.TextContentPart? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsToolCall => ToolCall != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolCall(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ToolCallContentPart? value)
+ {
+ value = ToolCall;
+ return IsToolCall;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolResult))]
#endif
public bool IsToolResult => ToolResult != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickToolResult(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ToolResultContentPart? value)
+ {
+ value = ToolResult;
+ return IsToolResult;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? toolCall = null,
- global::System.Func? toolResult = null,
+ global::System.Func? text = null,
+ global::System.Func? toolCall = null,
+ global::System.Func? toolResult = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? toolCall = null,
- global::System.Action? toolResult = null,
+ global::System.Action? text = null,
+
+ global::System.Action? toolCall = null,
+
+ global::System.Action? toolResult = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsToolCall)
+ {
+ toolCall?.Invoke(ToolCall!);
+ }
+ else if (IsToolResult)
+ {
+ toolResult?.Invoke(ToolResult!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? toolCall = null,
+ global::System.Action? toolResult = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem.g.cs
index a87213d..4ddee6b 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsApp => App != null;
+ ///
+ ///
+ ///
+ public bool TryPickApp(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.AppContext? value)
+ {
+ value = App;
+ return IsApp;
+ }
+
///
/// Project the user is currently viewing.
/// ``span_filter`` carries the project-scoped span filter expression when the
@@ -55,6 +68,19 @@ namespace Phoenix
#endif
public bool IsProject => Project != null;
+ ///
+ ///
+ ///
+ public bool TryPickProject(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ProjectContext? value)
+ {
+ value = Project;
+ return IsProject;
+ }
+
///
///
///
@@ -72,6 +98,19 @@ namespace Phoenix
#endif
public bool IsTrace => Trace != null;
+ ///
+ ///
+ ///
+ public bool TryPickTrace(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.TraceContext? value)
+ {
+ value = Trace;
+ return IsTrace;
+ }
+
///
/// Span the user has selected.
/// Exactly one of ``span_node_id`` (relay) or ``otel_span_id`` (OpenTelemetry
@@ -91,6 +130,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Span))]
#endif
public bool IsSpan => Span != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSpan(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.AgentSpanContext? value)
+ {
+ value = Span;
+ return IsSpan;
+ }
///
///
///
@@ -214,10 +266,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? app = null,
- global::System.Func? project = null,
- global::System.Func? trace = null,
- global::System.Func? span = null,
+ global::System.Func? app = null,
+ global::System.Func? project = null,
+ global::System.Func? trace = null,
+ global::System.Func? span = null,
bool validate = true)
{
if (validate)
@@ -249,10 +301,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? app = null,
- global::System.Action? project = null,
- global::System.Action? trace = null,
- global::System.Action? span = null,
+ global::System.Action? app = null,
+
+ global::System.Action? project = null,
+
+ global::System.Action? trace = null,
+
+ global::System.Action? span = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsApp)
+ {
+ app?.Invoke(App!);
+ }
+ else if (IsProject)
+ {
+ project?.Invoke(Project!);
+ }
+ else if (IsTrace)
+ {
+ trace?.Invoke(Trace!);
+ }
+ else if (IsSpan)
+ {
+ span?.Invoke(Span!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? app = null,
+ global::System.Action? project = null,
+ global::System.Action? trace = null,
+ global::System.Action? span = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem2.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem2.g.cs
index ba82fcd..14e0979 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem2.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.ContextsItem2.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsApp => App != null;
+ ///
+ ///
+ ///
+ public bool TryPickApp(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.AppContext? value)
+ {
+ value = App;
+ return IsApp;
+ }
+
///
/// Project the user is currently viewing.
/// ``span_filter`` carries the project-scoped span filter expression when the
@@ -55,6 +68,19 @@ namespace Phoenix
#endif
public bool IsProject => Project != null;
+ ///
+ ///
+ ///
+ public bool TryPickProject(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ProjectContext? value)
+ {
+ value = Project;
+ return IsProject;
+ }
+
///
///
///
@@ -72,6 +98,19 @@ namespace Phoenix
#endif
public bool IsTrace => Trace != null;
+ ///
+ ///
+ ///
+ public bool TryPickTrace(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.TraceContext? value)
+ {
+ value = Trace;
+ return IsTrace;
+ }
+
///
/// Span the user has selected.
/// Exactly one of ``span_node_id`` (relay) or ``otel_span_id`` (OpenTelemetry
@@ -91,6 +130,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Span))]
#endif
public bool IsSpan => Span != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSpan(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.AgentSpanContext? value)
+ {
+ value = Span;
+ return IsSpan;
+ }
///
///
///
@@ -214,10 +266,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? app = null,
- global::System.Func? project = null,
- global::System.Func? trace = null,
- global::System.Func? span = null,
+ global::System.Func? app = null,
+ global::System.Func? project = null,
+ global::System.Func? trace = null,
+ global::System.Func? span = null,
bool validate = true)
{
if (validate)
@@ -249,10 +301,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? app = null,
- global::System.Action? project = null,
- global::System.Action? trace = null,
- global::System.Action? span = null,
+ global::System.Action? app = null,
+
+ global::System.Action? project = null,
+
+ global::System.Action? trace = null,
+
+ global::System.Action? span = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsApp)
+ {
+ app?.Invoke(App!);
+ }
+ else if (IsProject)
+ {
+ project?.Invoke(Project!);
+ }
+ else if (IsTrace)
+ {
+ trace?.Invoke(Trace!);
+ }
+ else if (IsSpan)
+ {
+ span?.Invoke(Span!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? app = null,
+ global::System.Action? project = null,
+ global::System.Action? trace = null,
+ global::System.Action? span = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.CreateAnnotationConfigData.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.CreateAnnotationConfigData.g.cs
index 0b23662..f32f6f6 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.CreateAnnotationConfigData.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.CreateAnnotationConfigData.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsCategorical => Categorical != null;
+ ///
+ ///
+ ///
+ public bool TryPickCategorical(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CategoricalAnnotationConfigData? value)
+ {
+ value = Categorical;
+ return IsCategorical;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsContinuous => Continuous != null;
+ ///
+ ///
+ ///
+ public bool TryPickContinuous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ContinuousAnnotationConfigData? value)
+ {
+ value = Continuous;
+ return IsContinuous;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Freeform))]
#endif
public bool IsFreeform => Freeform != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFreeform(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.FreeformAnnotationConfigData? value)
+ {
+ value = Freeform;
+ return IsFreeform;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? categorical = null,
- global::System.Func? continuous = null,
- global::System.Func? freeform = null,
+ global::System.Func? categorical = null,
+ global::System.Func? continuous = null,
+ global::System.Func? freeform = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? categorical = null,
- global::System.Action? continuous = null,
- global::System.Action? freeform = null,
+ global::System.Action? categorical = null,
+
+ global::System.Action? continuous = null,
+
+ global::System.Action? freeform = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCategorical)
+ {
+ categorical?.Invoke(Categorical!);
+ }
+ else if (IsContinuous)
+ {
+ continuous?.Invoke(Continuous!);
+ }
+ else if (IsFreeform)
+ {
+ freeform?.Invoke(Freeform!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? categorical = null,
+ global::System.Action? continuous = null,
+ global::System.Action? freeform = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.Data.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.Data.g.cs
index d733b0b..5329906 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.Data.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.Data.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsCategorical => Categorical != null;
+ ///
+ ///
+ ///
+ public bool TryPickCategorical(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CategoricalAnnotationConfig? value)
+ {
+ value = Categorical;
+ return IsCategorical;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsContinuous => Continuous != null;
+ ///
+ ///
+ ///
+ public bool TryPickContinuous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ContinuousAnnotationConfig? value)
+ {
+ value = Continuous;
+ return IsContinuous;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Freeform))]
#endif
public bool IsFreeform => Freeform != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFreeform(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.FreeformAnnotationConfig? value)
+ {
+ value = Freeform;
+ return IsFreeform;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? categorical = null,
- global::System.Func? continuous = null,
- global::System.Func? freeform = null,
+ global::System.Func? categorical = null,
+ global::System.Func? continuous = null,
+ global::System.Func? freeform = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? categorical = null,
- global::System.Action? continuous = null,
- global::System.Action? freeform = null,
+ global::System.Action? categorical = null,
+
+ global::System.Action? continuous = null,
+
+ global::System.Action? freeform = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCategorical)
+ {
+ categorical?.Invoke(Categorical!);
+ }
+ else if (IsContinuous)
+ {
+ continuous?.Invoke(Continuous!);
+ }
+ else if (IsFreeform)
+ {
+ freeform?.Invoke(Freeform!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? categorical = null,
+ global::System.Action? continuous = null,
+ global::System.Action? freeform = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.Data2.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.Data2.g.cs
index 96ddc4b..64e4086 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.Data2.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.Data2.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsLocal => Local != null;
+ ///
+ ///
+ ///
+ public bool TryPickLocal(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.LocalUser? value)
+ {
+ value = Local;
+ return IsLocal;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsOauth2 => Oauth2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOauth2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.OAuth2User? value)
+ {
+ value = Oauth2;
+ return IsOauth2;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Ldap))]
#endif
public bool IsLdap => Ldap != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickLdap(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.LDAPUser? value)
+ {
+ value = Ldap;
+ return IsLdap;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? local = null,
- global::System.Func? oauth2 = null,
- global::System.Func? ldap = null,
+ global::System.Func? local = null,
+ global::System.Func? oauth2 = null,
+ global::System.Func? ldap = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? local = null,
- global::System.Action? oauth2 = null,
- global::System.Action? ldap = null,
+ global::System.Action? local = null,
+
+ global::System.Action? oauth2 = null,
+
+ global::System.Action? ldap = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsLocal)
+ {
+ local?.Invoke(Local!);
+ }
+ else if (IsOauth2)
+ {
+ oauth2?.Invoke(Oauth2!);
+ }
+ else if (IsLdap)
+ {
+ ldap?.Invoke(Ldap!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? local = null,
+ global::System.Action? oauth2 = null,
+ global::System.Action? ldap = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.Data3.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.Data3.g.cs
index d520ffb..6803bee 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.Data3.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.Data3.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsCategorical => Categorical != null;
+ ///
+ ///
+ ///
+ public bool TryPickCategorical(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CategoricalAnnotationConfig? value)
+ {
+ value = Categorical;
+ return IsCategorical;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsContinuous => Continuous != null;
+ ///
+ ///
+ ///
+ public bool TryPickContinuous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ContinuousAnnotationConfig? value)
+ {
+ value = Continuous;
+ return IsContinuous;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Freeform))]
#endif
public bool IsFreeform => Freeform != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFreeform(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.FreeformAnnotationConfig? value)
+ {
+ value = Freeform;
+ return IsFreeform;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? categorical = null,
- global::System.Func? continuous = null,
- global::System.Func? freeform = null,
+ global::System.Func? categorical = null,
+ global::System.Func? continuous = null,
+ global::System.Func? freeform = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? categorical = null,
- global::System.Action? continuous = null,
- global::System.Action? freeform = null,
+ global::System.Action? categorical = null,
+
+ global::System.Action? continuous = null,
+
+ global::System.Action? freeform = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCategorical)
+ {
+ categorical?.Invoke(Categorical!);
+ }
+ else if (IsContinuous)
+ {
+ continuous?.Invoke(Continuous!);
+ }
+ else if (IsFreeform)
+ {
+ freeform?.Invoke(Freeform!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? categorical = null,
+ global::System.Action? continuous = null,
+ global::System.Action? freeform = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.Data4.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.Data4.g.cs
index 7ce0162..ac1045b 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.Data4.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.Data4.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsCategorical => Categorical != null;
+ ///
+ ///
+ ///
+ public bool TryPickCategorical(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CategoricalAnnotationConfig? value)
+ {
+ value = Categorical;
+ return IsCategorical;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsContinuous => Continuous != null;
+ ///
+ ///
+ ///
+ public bool TryPickContinuous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ContinuousAnnotationConfig? value)
+ {
+ value = Continuous;
+ return IsContinuous;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Freeform))]
#endif
public bool IsFreeform => Freeform != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFreeform(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.FreeformAnnotationConfig? value)
+ {
+ value = Freeform;
+ return IsFreeform;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? categorical = null,
- global::System.Func? continuous = null,
- global::System.Func? freeform = null,
+ global::System.Func? categorical = null,
+ global::System.Func? continuous = null,
+ global::System.Func? freeform = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? categorical = null,
- global::System.Action? continuous = null,
- global::System.Action? freeform = null,
+ global::System.Action? categorical = null,
+
+ global::System.Action? continuous = null,
+
+ global::System.Action? freeform = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCategorical)
+ {
+ categorical?.Invoke(Categorical!);
+ }
+ else if (IsContinuous)
+ {
+ continuous?.Invoke(Continuous!);
+ }
+ else if (IsFreeform)
+ {
+ freeform?.Invoke(Freeform!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? categorical = null,
+ global::System.Action? continuous = null,
+ global::System.Action? freeform = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.Data5.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.Data5.g.cs
index 2640b73..dd8ab4e 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.Data5.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.Data5.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsLocal => Local != null;
+ ///
+ ///
+ ///
+ public bool TryPickLocal(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.LocalUser? value)
+ {
+ value = Local;
+ return IsLocal;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsOauth2 => Oauth2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOauth2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.OAuth2User? value)
+ {
+ value = Oauth2;
+ return IsOauth2;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Phoenix
#endif
public bool IsLdap => Ldap != null;
+ ///
+ ///
+ ///
+ public bool TryPickLdap(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.LDAPUser? value)
+ {
+ value = Ldap;
+ return IsLdap;
+ }
+
///
///
///
@@ -81,6 +120,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Anonymous))]
#endif
public bool IsAnonymous => Anonymous != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickAnonymous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.AnonymousUser? value)
+ {
+ value = Anonymous;
+ return IsAnonymous;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? local = null,
- global::System.Func? oauth2 = null,
- global::System.Func? ldap = null,
- global::System.Func? anonymous = null,
+ global::System.Func? local = null,
+ global::System.Func? oauth2 = null,
+ global::System.Func? ldap = null,
+ global::System.Func? anonymous = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? local = null,
- global::System.Action? oauth2 = null,
- global::System.Action? ldap = null,
- global::System.Action? anonymous = null,
+ global::System.Action? local = null,
+
+ global::System.Action? oauth2 = null,
+
+ global::System.Action? ldap = null,
+
+ global::System.Action? anonymous = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsLocal)
+ {
+ local?.Invoke(Local!);
+ }
+ else if (IsOauth2)
+ {
+ oauth2?.Invoke(Oauth2!);
+ }
+ else if (IsLdap)
+ {
+ ldap?.Invoke(Ldap!);
+ }
+ else if (IsAnonymous)
+ {
+ anonymous?.Invoke(Anonymous!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? local = null,
+ global::System.Action? oauth2 = null,
+ global::System.Action? ldap = null,
+ global::System.Action? anonymous = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.Data6.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.Data6.g.cs
index 8f7ffe9..425d792 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.Data6.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.Data6.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsCategorical => Categorical != null;
+ ///
+ ///
+ ///
+ public bool TryPickCategorical(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CategoricalAnnotationConfig? value)
+ {
+ value = Categorical;
+ return IsCategorical;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsContinuous => Continuous != null;
+ ///
+ ///
+ ///
+ public bool TryPickContinuous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ContinuousAnnotationConfig? value)
+ {
+ value = Continuous;
+ return IsContinuous;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Freeform))]
#endif
public bool IsFreeform => Freeform != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFreeform(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.FreeformAnnotationConfig? value)
+ {
+ value = Freeform;
+ return IsFreeform;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? categorical = null,
- global::System.Func? continuous = null,
- global::System.Func? freeform = null,
+ global::System.Func? categorical = null,
+ global::System.Func? continuous = null,
+ global::System.Func? freeform = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? categorical = null,
- global::System.Action? continuous = null,
- global::System.Action? freeform = null,
+ global::System.Action? categorical = null,
+
+ global::System.Action? continuous = null,
+
+ global::System.Action? freeform = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsCategorical)
+ {
+ categorical?.Invoke(Categorical!);
+ }
+ else if (IsContinuous)
+ {
+ continuous?.Invoke(Continuous!);
+ }
+ else if (IsFreeform)
+ {
+ freeform?.Invoke(Freeform!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? categorical = null,
+ global::System.Action? continuous = null,
+ global::System.Action? freeform = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Phoenix/Generated/Phoenix.Models.DataItem.g.cs b/src/libs/Phoenix/Generated/Phoenix.Models.DataItem.g.cs
index f4c43eb..121011a 100644
--- a/src/libs/Phoenix/Generated/Phoenix.Models.DataItem.g.cs
+++ b/src/libs/Phoenix/Generated/Phoenix.Models.DataItem.g.cs
@@ -31,6 +31,19 @@ namespace Phoenix
#endif
public bool IsCategorical => Categorical != null;
+ ///
+ ///
+ ///
+ public bool TryPickCategorical(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.CategoricalAnnotationConfig? value)
+ {
+ value = Categorical;
+ return IsCategorical;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Phoenix
#endif
public bool IsContinuous => Continuous != null;
+ ///
+ ///
+ ///
+ public bool TryPickContinuous(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.ContinuousAnnotationConfig? value)
+ {
+ value = Continuous;
+ return IsContinuous;
+ }
+
///
///
///
@@ -64,6 +90,19 @@ namespace Phoenix
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Freeform))]
#endif
public bool IsFreeform => Freeform != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFreeform(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Phoenix.FreeformAnnotationConfig? value)
+ {
+ value = Freeform;
+ return IsFreeform;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? categorical = null,
- global::System.Func? continuous = null,
- global::System.Func? freeform = null,
+ global::System.Func? categorical = null,
+ global::System.Func? continuous = null,
+ global::System.Func? freeform = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? categorical = null,
- global::System.Action? continuous = null,
- global::System.Action? freeform = null,
+ global::System.Action