diff --git a/src/libs/Letta/Generated/Letta.AnyOf.2.g.cs b/src/libs/Letta/Generated/Letta.AnyOf.2.g.cs
index 3e11e0b2..1094c726 100644
--- a/src/libs/Letta/Generated/Letta.AnyOf.2.g.cs
+++ b/src/libs/Letta/Generated/Letta.AnyOf.2.g.cs
@@ -25,6 +25,19 @@ namespace Letta
#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 Letta
[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/Letta/Generated/Letta.AnyOf.3.g.cs b/src/libs/Letta/Generated/Letta.AnyOf.3.g.cs
index 8286aed0..441ee63f 100644
--- a/src/libs/Letta/Generated/Letta.AnyOf.3.g.cs
+++ b/src/libs/Letta/Generated/Letta.AnyOf.3.g.cs
@@ -25,6 +25,19 @@ namespace Letta
#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 Letta
#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 Letta
[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/Letta/Generated/Letta.AnyOf.4.g.cs b/src/libs/Letta/Generated/Letta.AnyOf.4.g.cs
index 930bb790..2fefbf82 100644
--- a/src/libs/Letta/Generated/Letta.AnyOf.4.g.cs
+++ b/src/libs/Letta/Generated/Letta.AnyOf.4.g.cs
@@ -25,6 +25,19 @@ namespace Letta
#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 Letta
#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 Letta
#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 Letta
[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/Letta/Generated/Letta.AnyOf.5.g.cs b/src/libs/Letta/Generated/Letta.AnyOf.5.g.cs
index e7f6a833..57fa603a 100644
--- a/src/libs/Letta/Generated/Letta.AnyOf.5.g.cs
+++ b/src/libs/Letta/Generated/Letta.AnyOf.5.g.cs
@@ -25,6 +25,19 @@ namespace Letta
#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 Letta
#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 Letta
#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 Letta
#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;
+ }
+
///
///
///
@@ -92,6 +144,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))]
#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;
+ }
///
///
///
@@ -275,6 +340,48 @@ 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,
+ 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 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/Letta/Generated/Letta.AnyOf.6.g.cs b/src/libs/Letta/Generated/Letta.AnyOf.6.g.cs
index 9f864bf0..b9f5b58e 100644
--- a/src/libs/Letta/Generated/Letta.AnyOf.6.g.cs
+++ b/src/libs/Letta/Generated/Letta.AnyOf.6.g.cs
@@ -25,6 +25,19 @@ namespace Letta
#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 Letta
#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 Letta
#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 Letta
#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 Letta
#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;
+ }
+
///
///
///
@@ -109,6 +174,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))]
#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;
+ }
///
///
///
@@ -319,6 +397,54 @@ 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,
+ 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 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/Letta/Generated/Letta.LettaClient.Constructors.Bearer.g.cs b/src/libs/Letta/Generated/Letta.LettaClient.Constructors.Bearer.g.cs
index d98e9949..9adfd974 100644
--- a/src/libs/Letta/Generated/Letta.LettaClient.Constructors.Bearer.g.cs
+++ b/src/libs/Letta/Generated/Letta.LettaClient.Constructors.Bearer.g.cs
@@ -26,5 +26,6 @@ partial void Authorizing(
ref string apiKey);
partial void Authorized(
global::System.Net.Http.HttpClient client);
+
}
}
\ No newline at end of file
diff --git a/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item.g.cs b/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item.g.cs
index afd04379..00ef7f76 100644
--- a/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsApproval => Approval != null;
+ ///
+ ///
+ ///
+ public bool TryPickApproval(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ApprovalReturn? value)
+ {
+ value = Approval;
+ return IsApproval;
+ }
+
///
///
///
@@ -47,6 +60,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))]
#endif
public bool IsTool => Tool != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickTool(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.LettaSchemasLettaMessageToolReturn? value)
+ {
+ value = Tool;
+ return IsTool;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? approval = null,
- global::System.Func? tool = null,
+ global::System.Func? approval = null,
+ global::System.Func? tool = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? approval = null,
- global::System.Action? tool = null,
+ global::System.Action? approval = null,
+
+ global::System.Action? tool = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsApproval)
+ {
+ approval?.Invoke(Approval!);
+ }
+ else if (IsTool)
+ {
+ tool?.Invoke(Tool!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? approval = null,
+ global::System.Action? tool = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item2.g.cs b/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item2.g.cs
index 0fe876b2..629e9efd 100644
--- a/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item2.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.ApprovalsVariant1Item2.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsApproval => Approval != null;
+ ///
+ ///
+ ///
+ public bool TryPickApproval(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ApprovalReturn? value)
+ {
+ value = Approval;
+ return IsApproval;
+ }
+
///
///
///
@@ -47,6 +60,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))]
#endif
public bool IsTool => Tool != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickTool(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.LettaSchemasLettaMessageToolReturn? value)
+ {
+ value = Tool;
+ return IsTool;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? approval = null,
- global::System.Func? tool = null,
+ global::System.Func? approval = null,
+ global::System.Func? tool = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? approval = null,
- global::System.Action? tool = null,
+ global::System.Action? approval = null,
+
+ global::System.Action? tool = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsApproval)
+ {
+ approval?.Invoke(Approval!);
+ }
+ else if (IsTool)
+ {
+ tool?.Invoke(Tool!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? approval = null,
+ global::System.Action? tool = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config.g.cs b/src/libs/Letta/Generated/Letta.Models.Config.g.cs
index 66e80218..2dd718a8 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsStdio => Stdio != null;
+ ///
+ ///
+ ///
+ public bool TryPickStdio(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.CreateStdioMCPServer? value)
+ {
+ value = Stdio;
+ return IsStdio;
+ }
+
///
/// Create a new SSE MCP server
///
@@ -48,6 +61,19 @@ namespace Letta
#endif
public bool IsSse => Sse != null;
+ ///
+ ///
+ ///
+ public bool TryPickSse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.CreateSSEMCPServer? value)
+ {
+ value = Sse;
+ return IsSse;
+ }
+
///
/// Create a new Streamable HTTP MCP server
///
@@ -64,6 +90,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamableHttp))]
#endif
public bool IsStreamableHttp => StreamableHttp != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickStreamableHttp(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.CreateStreamableHTTPMCPServer? value)
+ {
+ value = StreamableHttp;
+ return IsStreamableHttp;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? stdio = null,
- global::System.Func? sse = null,
- global::System.Func? streamableHttp = null,
+ global::System.Func? stdio = null,
+ global::System.Func? sse = null,
+ global::System.Func? streamableHttp = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? stdio = null,
- global::System.Action? sse = null,
- global::System.Action? streamableHttp = null,
+ global::System.Action? stdio = null,
+
+ global::System.Action? sse = null,
+
+ global::System.Action? streamableHttp = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsStdio)
+ {
+ stdio?.Invoke(Stdio!);
+ }
+ else if (IsSse)
+ {
+ sse?.Invoke(Sse!);
+ }
+ else if (IsStreamableHttp)
+ {
+ streamableHttp?.Invoke(StreamableHttp!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? stdio = null,
+ global::System.Action? sse = null,
+ global::System.Action? streamableHttp = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config4.g.cs b/src/libs/Letta/Generated/Letta.Models.Config4.g.cs
index 05b11636..f53c6e7f 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config4.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config4.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsStdio => Stdio != null;
+ ///
+ ///
+ ///
+ public bool TryPickStdio(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.LettaSchemasMcpServerUpdateStdioMCPServer? value)
+ {
+ value = Stdio;
+ return IsStdio;
+ }
+
///
/// Update schema for SSE MCP server - all fields optional
///
@@ -48,6 +61,19 @@ namespace Letta
#endif
public bool IsSse => Sse != null;
+ ///
+ ///
+ ///
+ public bool TryPickSse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.LettaSchemasMcpServerUpdateSSEMCPServer? value)
+ {
+ value = Sse;
+ return IsSse;
+ }
+
///
/// Update schema for Streamable HTTP MCP server - all fields optional
///
@@ -64,6 +90,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamableHttp))]
#endif
public bool IsStreamableHttp => StreamableHttp != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickStreamableHttp(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.LettaSchemasMcpServerUpdateStreamableHTTPMCPServer? value)
+ {
+ value = StreamableHttp;
+ return IsStreamableHttp;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? stdio = null,
- global::System.Func? sse = null,
- global::System.Func? streamableHttp = null,
+ global::System.Func? stdio = null,
+ global::System.Func? sse = null,
+ global::System.Func? streamableHttp = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? stdio = null,
- global::System.Action? sse = null,
- global::System.Action? streamableHttp = null,
+ global::System.Action? stdio = null,
+
+ global::System.Action? sse = null,
+
+ global::System.Action? streamableHttp = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsStdio)
+ {
+ stdio?.Invoke(Stdio!);
+ }
+ else if (IsSse)
+ {
+ sse?.Invoke(Sse!);
+ }
+ else if (IsStreamableHttp)
+ {
+ streamableHttp?.Invoke(StreamableHttp!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? stdio = null,
+ global::System.Action? sse = null,
+ global::System.Action? streamableHttp = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config5.g.cs b/src/libs/Letta/Generated/Letta.Models.Config5.g.cs
index 6c8b6cc6..7576c890 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config5.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config5.g.cs
@@ -26,6 +26,19 @@ namespace Letta
#endif
public bool IsSlackChannelReader => SlackChannelReader != null;
+ ///
+ ///
+ ///
+ public bool TryPickSlackChannelReader(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesCreatePipelineResponsePipelineConfigVariant1? value)
+ {
+ value = SlackChannelReader;
+ return IsSlackChannelReader;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomWebhook))]
#endif
public bool IsCustomWebhook => CustomWebhook != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomWebhook(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesCreatePipelineResponsePipelineConfigVariant2? value)
+ {
+ value = CustomWebhook;
+ return IsCustomWebhook;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? slackChannelReader = null,
- global::System.Func? customWebhook = null,
+ global::System.Func? slackChannelReader = null,
+ global::System.Func? customWebhook = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? slackChannelReader = null,
- global::System.Action? customWebhook = null,
+ global::System.Action? slackChannelReader = null,
+
+ global::System.Action? customWebhook = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSlackChannelReader)
+ {
+ slackChannelReader?.Invoke(SlackChannelReader!);
+ }
+ else if (IsCustomWebhook)
+ {
+ customWebhook?.Invoke(CustomWebhook!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? slackChannelReader = null,
+ global::System.Action? customWebhook = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config6.g.cs b/src/libs/Letta/Generated/Letta.Models.Config6.g.cs
index 3c253339..e56962aa 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config6.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config6.g.cs
@@ -26,6 +26,19 @@ namespace Letta
#endif
public bool IsSlackChannelReader => SlackChannelReader != null;
+ ///
+ ///
+ ///
+ public bool TryPickSlackChannelReader(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesListPipelinesResponsePipelineConfigVariant1? value)
+ {
+ value = SlackChannelReader;
+ return IsSlackChannelReader;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomWebhook))]
#endif
public bool IsCustomWebhook => CustomWebhook != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomWebhook(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesListPipelinesResponsePipelineConfigVariant2? value)
+ {
+ value = CustomWebhook;
+ return IsCustomWebhook;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? slackChannelReader = null,
- global::System.Func? customWebhook = null,
+ global::System.Func? slackChannelReader = null,
+ global::System.Func? customWebhook = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? slackChannelReader = null,
- global::System.Action? customWebhook = null,
+ global::System.Action? slackChannelReader = null,
+
+ global::System.Action? customWebhook = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSlackChannelReader)
+ {
+ slackChannelReader?.Invoke(SlackChannelReader!);
+ }
+ else if (IsCustomWebhook)
+ {
+ customWebhook?.Invoke(CustomWebhook!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? slackChannelReader = null,
+ global::System.Action? customWebhook = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config7.g.cs b/src/libs/Letta/Generated/Letta.Models.Config7.g.cs
index a9711e46..08609d7a 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config7.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config7.g.cs
@@ -26,6 +26,19 @@ namespace Letta
#endif
public bool IsSlackChannelReader => SlackChannelReader != null;
+ ///
+ ///
+ ///
+ public bool TryPickSlackChannelReader(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesGetPipelineResponsePipelineConfigVariant1? value)
+ {
+ value = SlackChannelReader;
+ return IsSlackChannelReader;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomWebhook))]
#endif
public bool IsCustomWebhook => CustomWebhook != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomWebhook(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesGetPipelineResponsePipelineConfigVariant2? value)
+ {
+ value = CustomWebhook;
+ return IsCustomWebhook;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? slackChannelReader = null,
- global::System.Func? customWebhook = null,
+ global::System.Func? slackChannelReader = null,
+ global::System.Func? customWebhook = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? slackChannelReader = null,
- global::System.Action? customWebhook = null,
+ global::System.Action? slackChannelReader = null,
+
+ global::System.Action? customWebhook = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSlackChannelReader)
+ {
+ slackChannelReader?.Invoke(SlackChannelReader!);
+ }
+ else if (IsCustomWebhook)
+ {
+ customWebhook?.Invoke(CustomWebhook!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? slackChannelReader = null,
+ global::System.Action? customWebhook = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config8.g.cs b/src/libs/Letta/Generated/Letta.Models.Config8.g.cs
index c00a75d8..b5c68fd7 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config8.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config8.g.cs
@@ -26,6 +26,19 @@ namespace Letta
#endif
public bool IsSlackChannelReader => SlackChannelReader != null;
+ ///
+ ///
+ ///
+ public bool TryPickSlackChannelReader(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesUpdatePipelineResponsePipelineConfigVariant1? value)
+ {
+ value = SlackChannelReader;
+ return IsSlackChannelReader;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomWebhook))]
#endif
public bool IsCustomWebhook => CustomWebhook != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomWebhook(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesUpdatePipelineResponsePipelineConfigVariant2? value)
+ {
+ value = CustomWebhook;
+ return IsCustomWebhook;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? slackChannelReader = null,
- global::System.Func? customWebhook = null,
+ global::System.Func? slackChannelReader = null,
+ global::System.Func? customWebhook = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? slackChannelReader = null,
- global::System.Action? customWebhook = null,
+ global::System.Action? slackChannelReader = null,
+
+ global::System.Action? customWebhook = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSlackChannelReader)
+ {
+ slackChannelReader?.Invoke(SlackChannelReader!);
+ }
+ else if (IsCustomWebhook)
+ {
+ customWebhook?.Invoke(CustomWebhook!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? slackChannelReader = null,
+ global::System.Action? customWebhook = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.Config9.g.cs b/src/libs/Letta/Generated/Letta.Models.Config9.g.cs
index d1b6691f..24486a08 100644
--- a/src/libs/Letta/Generated/Letta.Models.Config9.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.Config9.g.cs
@@ -26,6 +26,19 @@ namespace Letta
#endif
public bool IsSlackChannelReader => SlackChannelReader != null;
+ ///
+ ///
+ ///
+ public bool TryPickSlackChannelReader(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesUpdatePipelineProducerConfigResponsePipelineConfigVariant1? value)
+ {
+ value = SlackChannelReader;
+ return IsSlackChannelReader;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomWebhook))]
#endif
public bool IsCustomWebhook => CustomWebhook != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomWebhook(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.PipelinesUpdatePipelineProducerConfigResponsePipelineConfigVariant2? value)
+ {
+ value = CustomWebhook;
+ return IsCustomWebhook;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? slackChannelReader = null,
- global::System.Func? customWebhook = null,
+ global::System.Func? slackChannelReader = null,
+ global::System.Func? customWebhook = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? slackChannelReader = null,
- global::System.Action? customWebhook = null,
+ global::System.Action? slackChannelReader = null,
+
+ global::System.Action? customWebhook = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSlackChannelReader)
+ {
+ slackChannelReader?.Invoke(SlackChannelReader!);
+ }
+ else if (IsCustomWebhook)
+ {
+ customWebhook?.Invoke(CustomWebhook!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? slackChannelReader = null,
+ global::System.Action? customWebhook = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.ContentVariant1Item.g.cs b/src/libs/Letta/Generated/Letta.Models.ContentVariant1Item.g.cs
index d1d4c536..30176bac 100644
--- a/src/libs/Letta/Generated/Letta.Models.ContentVariant1Item.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.ContentVariant1Item.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.TextContent? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Letta
#endif
public bool IsImage => Image != null;
+ ///
+ ///
+ ///
+ public bool TryPickImage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ImageContent? value)
+ {
+ value = Image;
+ return IsImage;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Letta
#endif
public bool IsToolCall => ToolCall != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolCall(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ToolCallContent? value)
+ {
+ value = ToolCall;
+ return IsToolCall;
+ }
+
///
///
///
@@ -82,6 +121,19 @@ namespace Letta
#endif
public bool IsToolReturn => ToolReturn != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolReturn(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ToolReturnContent? value)
+ {
+ value = ToolReturn;
+ return IsToolReturn;
+ }
+
///
/// Sent via the Anthropic Messages API
///
@@ -99,6 +151,19 @@ namespace Letta
#endif
public bool IsOmittedReasoning1 => OmittedReasoning1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOmittedReasoning1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ReasoningContent? value)
+ {
+ value = OmittedReasoning1;
+ return IsOmittedReasoning1;
+ }
+
///
/// Sent via the Anthropic Messages API
///
@@ -116,6 +181,19 @@ namespace Letta
#endif
public bool IsRedactedReasoning => RedactedReasoning != null;
+ ///
+ ///
+ ///
+ public bool TryPickRedactedReasoning(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.RedactedReasoningContent? value)
+ {
+ value = RedactedReasoning;
+ return IsRedactedReasoning;
+ }
+
///
/// A placeholder for reasoning content we know is present, but isn't returned by the provider (e.g. OpenAI GPT-5 on ChatCompletions)
///
@@ -133,6 +211,19 @@ namespace Letta
#endif
public bool IsOmittedReasoning2 => OmittedReasoning2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOmittedReasoning2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.OmittedReasoningContent? value)
+ {
+ value = OmittedReasoning2;
+ return IsOmittedReasoning2;
+ }
+
///
/// The style of reasoning content returned by the OpenAI Responses API
///
@@ -149,6 +240,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SummarizedReasoning))]
#endif
public bool IsSummarizedReasoning => SummarizedReasoning != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSummarizedReasoning(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.SummarizedReasoningContent? value)
+ {
+ value = SummarizedReasoning;
+ return IsSummarizedReasoning;
+ }
///
///
///
@@ -360,14 +464,14 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? image = null,
- global::System.Func? toolCall = null,
- global::System.Func? toolReturn = null,
- global::System.Func? omittedReasoning1 = null,
- global::System.Func? redactedReasoning = null,
- global::System.Func? omittedReasoning2 = null,
- global::System.Func? summarizedReasoning = null,
+ global::System.Func? text = null,
+ global::System.Func? image = null,
+ global::System.Func? toolCall = null,
+ global::System.Func? toolReturn = null,
+ global::System.Func? omittedReasoning1 = null,
+ global::System.Func? redactedReasoning = null,
+ global::System.Func? omittedReasoning2 = null,
+ global::System.Func? summarizedReasoning = null,
bool validate = true)
{
if (validate)
@@ -415,14 +519,74 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? image = null,
- global::System.Action? toolCall = null,
- global::System.Action? toolReturn = null,
- global::System.Action? omittedReasoning1 = null,
- global::System.Action? redactedReasoning = null,
- global::System.Action? omittedReasoning2 = null,
- global::System.Action? summarizedReasoning = null,
+ global::System.Action? text = null,
+
+ global::System.Action? image = null,
+
+ global::System.Action? toolCall = null,
+
+ global::System.Action? toolReturn = null,
+
+ global::System.Action? omittedReasoning1 = null,
+
+ global::System.Action? redactedReasoning = null,
+
+ global::System.Action? omittedReasoning2 = null,
+
+ global::System.Action? summarizedReasoning = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImage)
+ {
+ image?.Invoke(Image!);
+ }
+ else if (IsToolCall)
+ {
+ toolCall?.Invoke(ToolCall!);
+ }
+ else if (IsToolReturn)
+ {
+ toolReturn?.Invoke(ToolReturn!);
+ }
+ else if (IsOmittedReasoning1)
+ {
+ omittedReasoning1?.Invoke(OmittedReasoning1!);
+ }
+ else if (IsRedactedReasoning)
+ {
+ redactedReasoning?.Invoke(RedactedReasoning!);
+ }
+ else if (IsOmittedReasoning2)
+ {
+ omittedReasoning2?.Invoke(OmittedReasoning2!);
+ }
+ else if (IsSummarizedReasoning)
+ {
+ summarizedReasoning?.Invoke(SummarizedReasoning!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? image = null,
+ global::System.Action? toolCall = null,
+ global::System.Action? toolReturn = null,
+ global::System.Action? omittedReasoning1 = null,
+ global::System.Action? redactedReasoning = null,
+ global::System.Action? omittedReasoning2 = null,
+ global::System.Action? summarizedReasoning = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.DataItem.g.cs b/src/libs/Letta/Generated/Letta.Models.DataItem.g.cs
index ac0281a0..0572d3af 100644
--- a/src/libs/Letta/Generated/Letta.Models.DataItem.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.DataItem.g.cs
@@ -25,6 +25,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Agent))]
#endif
public bool IsAgent => Agent != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickAgent(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ClientSideAccessTokensCreateClientSideAccessTokenResponsePolicyDataItemVariant1? value)
+ {
+ value = Agent;
+ return IsAgent;
+ }
///
///
///
@@ -69,7 +82,7 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agent = null,
+ global::System.Func? agent = null,
bool validate = true)
{
if (validate)
@@ -89,7 +102,25 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agent = null,
+ global::System.Action? agent = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgent)
+ {
+ agent?.Invoke(Agent!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agent = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.DataItem2.g.cs b/src/libs/Letta/Generated/Letta.Models.DataItem2.g.cs
index fd2a0910..b38f481c 100644
--- a/src/libs/Letta/Generated/Letta.Models.DataItem2.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.DataItem2.g.cs
@@ -25,6 +25,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Agent))]
#endif
public bool IsAgent => Agent != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickAgent(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ClientSideAccessTokensListClientSideAccessTokensResponseTokenPolicyDataItemVariant1? value)
+ {
+ value = Agent;
+ return IsAgent;
+ }
///
///
///
@@ -69,7 +82,7 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agent = null,
+ global::System.Func? agent = null,
bool validate = true)
{
if (validate)
@@ -89,7 +102,25 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agent = null,
+ global::System.Action? agent = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgent)
+ {
+ agent?.Invoke(Agent!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agent = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.EventsItem.g.cs b/src/libs/Letta/Generated/Letta.Models.EventsItem.g.cs
index 057665eb..55e240e0 100644
--- a/src/libs/Letta/Generated/Letta.Models.EventsItem.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.EventsItem.g.cs
@@ -26,6 +26,19 @@ namespace Letta
#endif
public bool IsSessionStart => SessionStart != null;
+ ///
+ ///
+ ///
+ public bool TryPickSessionStart(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.MetadataSendTelemetryRequestEventVariant1? value)
+ {
+ value = SessionStart;
+ return IsSessionStart;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Letta
#endif
public bool IsSessionEnd => SessionEnd != null;
+ ///
+ ///
+ ///
+ public bool TryPickSessionEnd(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.MetadataSendTelemetryRequestEventVariant2? value)
+ {
+ value = SessionEnd;
+ return IsSessionEnd;
+ }
+
///
///
///
@@ -60,6 +86,19 @@ namespace Letta
#endif
public bool IsToolUsage => ToolUsage != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolUsage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.MetadataSendTelemetryRequestEventVariant3? value)
+ {
+ value = ToolUsage;
+ return IsToolUsage;
+ }
+
///
///
///
@@ -77,6 +116,19 @@ namespace Letta
#endif
public bool IsError => Error != null;
+ ///
+ ///
+ ///
+ public bool TryPickError(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.MetadataSendTelemetryRequestEventVariant4? value)
+ {
+ value = Error;
+ return IsError;
+ }
+
///
///
///
@@ -93,6 +145,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserInput))]
#endif
public bool IsUserInput => UserInput != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickUserInput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.MetadataSendTelemetryRequestEventVariant5? value)
+ {
+ value = UserInput;
+ return IsUserInput;
+ }
///
///
///
@@ -235,11 +300,11 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? sessionStart = null,
- global::System.Func? sessionEnd = null,
- global::System.Func? toolUsage = null,
- global::System.Func? error = null,
- global::System.Func? userInput = null,
+ global::System.Func? sessionStart = null,
+ global::System.Func? sessionEnd = null,
+ global::System.Func? toolUsage = null,
+ global::System.Func? error = null,
+ global::System.Func? userInput = null,
bool validate = true)
{
if (validate)
@@ -275,11 +340,53 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? sessionStart = null,
- global::System.Action? sessionEnd = null,
- global::System.Action? toolUsage = null,
- global::System.Action? error = null,
- global::System.Action? userInput = null,
+ global::System.Action? sessionStart = null,
+
+ global::System.Action? sessionEnd = null,
+
+ global::System.Action? toolUsage = null,
+
+ global::System.Action? error = null,
+
+ global::System.Action? userInput = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSessionStart)
+ {
+ sessionStart?.Invoke(SessionStart!);
+ }
+ else if (IsSessionEnd)
+ {
+ sessionEnd?.Invoke(SessionEnd!);
+ }
+ else if (IsToolUsage)
+ {
+ toolUsage?.Invoke(ToolUsage!);
+ }
+ else if (IsError)
+ {
+ error?.Invoke(Error!);
+ }
+ else if (IsUserInput)
+ {
+ userInput?.Invoke(UserInput!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? sessionStart = null,
+ global::System.Action? sessionEnd = null,
+ global::System.Action? toolUsage = null,
+ global::System.Action? error = null,
+ global::System.Action? userInput = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item.g.cs b/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item.g.cs
index e5c87c20..d01f3e7a 100644
--- a/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.TextContent? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -47,6 +60,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))]
#endif
public bool IsImage => Image != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickImage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ImageContent? value)
+ {
+ value = Image;
+ return IsImage;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? image = null,
+ global::System.Func? text = null,
+ global::System.Func? image = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? image = null,
+ global::System.Action? text = null,
+
+ global::System.Action? image = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImage)
+ {
+ image?.Invoke(Image!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? image = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item2.g.cs b/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item2.g.cs
index 6ebdab15..f0c8780e 100644
--- a/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item2.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.FuncResponseVariant2Item2.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.TextContent? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -47,6 +60,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))]
#endif
public bool IsImage => Image != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickImage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ImageContent? value)
+ {
+ value = Image;
+ return IsImage;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? image = null,
+ global::System.Func? text = null,
+ global::System.Func? image = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? image = null,
+ global::System.Action? text = null,
+
+ global::System.Action? image = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImage)
+ {
+ image?.Invoke(Image!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? image = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Letta/Generated/Letta.Models.InputVariant2Item.g.cs b/src/libs/Letta/Generated/Letta.Models.InputVariant2Item.g.cs
index 42428042..3f2bf02a 100644
--- a/src/libs/Letta/Generated/Letta.Models.InputVariant2Item.g.cs
+++ b/src/libs/Letta/Generated/Letta.Models.InputVariant2Item.g.cs
@@ -31,6 +31,19 @@ namespace Letta
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.TextContent? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Letta
#endif
public bool IsImage => Image != null;
+ ///
+ ///
+ ///
+ public bool TryPickImage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ImageContent? value)
+ {
+ value = Image;
+ return IsImage;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Letta
#endif
public bool IsToolCall => ToolCall != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolCall(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ToolCallContent? value)
+ {
+ value = ToolCall;
+ return IsToolCall;
+ }
+
///
///
///
@@ -82,6 +121,19 @@ namespace Letta
#endif
public bool IsToolReturn => ToolReturn != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolReturn(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ToolReturnContent? value)
+ {
+ value = ToolReturn;
+ return IsToolReturn;
+ }
+
///
/// Sent via the Anthropic Messages API
///
@@ -99,6 +151,19 @@ namespace Letta
#endif
public bool IsOmittedReasoning1 => OmittedReasoning1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOmittedReasoning1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.ReasoningContent? value)
+ {
+ value = OmittedReasoning1;
+ return IsOmittedReasoning1;
+ }
+
///
/// Sent via the Anthropic Messages API
///
@@ -116,6 +181,19 @@ namespace Letta
#endif
public bool IsRedactedReasoning => RedactedReasoning != null;
+ ///
+ ///
+ ///
+ public bool TryPickRedactedReasoning(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.RedactedReasoningContent? value)
+ {
+ value = RedactedReasoning;
+ return IsRedactedReasoning;
+ }
+
///
/// A placeholder for reasoning content we know is present, but isn't returned by the provider (e.g. OpenAI GPT-5 on ChatCompletions)
///
@@ -133,6 +211,19 @@ namespace Letta
#endif
public bool IsOmittedReasoning2 => OmittedReasoning2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOmittedReasoning2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.OmittedReasoningContent? value)
+ {
+ value = OmittedReasoning2;
+ return IsOmittedReasoning2;
+ }
+
///
/// The style of reasoning content returned by the OpenAI Responses API
///
@@ -149,6 +240,19 @@ namespace Letta
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SummarizedReasoning))]
#endif
public bool IsSummarizedReasoning => SummarizedReasoning != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSummarizedReasoning(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Letta.SummarizedReasoningContent? value)
+ {
+ value = SummarizedReasoning;
+ return IsSummarizedReasoning;
+ }
///
///
///
@@ -360,14 +464,14 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? image = null,
- global::System.Func? toolCall = null,
- global::System.Func? toolReturn = null,
- global::System.Func? omittedReasoning1 = null,
- global::System.Func? redactedReasoning = null,
- global::System.Func