diff --git a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.g.cs
index 83622cf..d092dc0 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.2.g.cs
@@ -25,6 +25,19 @@ namespace Mixedbread
#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 Mixedbread
[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/Mixedbread/Generated/Mixedbread.AnyOf.3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.g.cs
index 646757b..9e46497 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.3.g.cs
@@ -25,6 +25,19 @@ namespace Mixedbread
#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 Mixedbread
#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 Mixedbread
[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/Mixedbread/Generated/Mixedbread.AnyOf.4.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.g.cs
index 9af2338..ca3cc49 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.AnyOf.4.g.cs
@@ -25,6 +25,19 @@ namespace Mixedbread
#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 Mixedbread
#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 Mixedbread
#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 Mixedbread
[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/Mixedbread/Generated/Mixedbread.MixedbreadClient.Constructors.Bearer.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Constructors.Bearer.g.cs
index 9a36058..dbe4b5a 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.Constructors.Bearer.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.MixedbreadClient.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/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant1.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant1.g.cs
index b1a8aae..0fa5be2 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant1.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant1.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsOauth2 => Oauth2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOauth2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.DataSourceOAuth2Params? value)
+ {
+ value = Oauth2;
+ return IsOauth2;
+ }
+
///
/// Authentication parameters for a API key data source.
///
@@ -47,6 +60,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApiKey))]
#endif
public bool IsApiKey => ApiKey != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickApiKey(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.DataSourceApiKeyParams? value)
+ {
+ value = ApiKey;
+ return IsApiKey;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? oauth2 = null,
- global::System.Func? apiKey = null,
+ global::System.Func? oauth2 = null,
+ global::System.Func? apiKey = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? oauth2 = null,
- global::System.Action? apiKey = null,
+ global::System.Action? oauth2 = null,
+
+ global::System.Action? apiKey = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsOauth2)
+ {
+ oauth2?.Invoke(Oauth2!);
+ }
+ else if (IsApiKey)
+ {
+ apiKey?.Invoke(ApiKey!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? oauth2 = null,
+ global::System.Action? apiKey = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant12.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant12.g.cs
index d173624..d86cf04 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant12.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant12.g.cs
@@ -30,6 +30,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Oauth2))]
#endif
public bool IsOauth2 => Oauth2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickOauth2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.OAuth2CreateOrUpdateParams? value)
+ {
+ value = Oauth2;
+ return IsOauth2;
+ }
///
///
///
@@ -87,7 +100,7 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? oauth2 = null,
+ global::System.Func? oauth2 = null,
bool validate = true)
{
if (validate)
@@ -107,7 +120,25 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? oauth2 = null,
+ global::System.Action? oauth2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsOauth2)
+ {
+ oauth2?.Invoke(Oauth2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? oauth2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant13.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant13.g.cs
index 687f338..bd18742 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant13.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.AuthParamsVariant13.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsOauth2 => Oauth2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickOauth2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.OAuth2CreateOrUpdateParams? value)
+ {
+ value = Oauth2;
+ return IsOauth2;
+ }
+
///
/// Base class for API key create or update parameters.
///
@@ -47,6 +60,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ApiKey))]
#endif
public bool IsApiKey => ApiKey != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickApiKey(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.ApiKeyCreateOrUpdateParams? value)
+ {
+ value = ApiKey;
+ return IsApiKey;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? oauth2 = null,
- global::System.Func? apiKey = null,
+ global::System.Func? oauth2 = null,
+ global::System.Func? apiKey = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? oauth2 = null,
- global::System.Action? apiKey = null,
+ global::System.Action? oauth2 = null,
+
+ global::System.Action? apiKey = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsOauth2)
+ {
+ oauth2?.Invoke(Oauth2!);
+ }
+ else if (IsApiKey)
+ {
+ apiKey?.Invoke(ApiKey!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? oauth2 = null,
+ global::System.Action? apiKey = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item.g.cs
index 1ef92ba..83e5f0e 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.TextInputChunk? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsImageUrl => ImageUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.ImageUrlInputChunk? value)
+ {
+ value = ImageUrl;
+ return IsImageUrl;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsAudioUrl => AudioUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickAudioUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.AudioUrlInputChunk? value)
+ {
+ value = AudioUrl;
+ return IsAudioUrl;
+ }
+
///
///
///
@@ -81,6 +120,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VideoUrl))]
#endif
public bool IsVideoUrl => VideoUrl != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickVideoUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.VideoUrlInputChunk? value)
+ {
+ value = VideoUrl;
+ return IsVideoUrl;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? imageUrl = null,
- global::System.Func? audioUrl = null,
- global::System.Func? videoUrl = null,
+ global::System.Func? text = null,
+ global::System.Func? imageUrl = null,
+ global::System.Func? audioUrl = null,
+ global::System.Func? videoUrl = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? imageUrl = null,
- global::System.Action? audioUrl = null,
- global::System.Action? videoUrl = null,
+ global::System.Action? text = null,
+
+ global::System.Action? imageUrl = null,
+
+ global::System.Action? audioUrl = null,
+
+ global::System.Action? videoUrl = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImageUrl)
+ {
+ imageUrl?.Invoke(ImageUrl!);
+ }
+ else if (IsAudioUrl)
+ {
+ audioUrl?.Invoke(AudioUrl!);
+ }
+ else if (IsVideoUrl)
+ {
+ videoUrl?.Invoke(VideoUrl!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? imageUrl = null,
+ global::System.Action? audioUrl = null,
+ global::System.Action? videoUrl = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item2.g.cs
index d226110..80df080 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.ChunksVariant1Item2.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.TextInputChunk? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsImageUrl => ImageUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.ImageUrlInputChunk? value)
+ {
+ value = ImageUrl;
+ return IsImageUrl;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsAudioUrl => AudioUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickAudioUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.AudioUrlInputChunk? value)
+ {
+ value = AudioUrl;
+ return IsAudioUrl;
+ }
+
///
///
///
@@ -81,6 +120,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VideoUrl))]
#endif
public bool IsVideoUrl => VideoUrl != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickVideoUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.VideoUrlInputChunk? value)
+ {
+ value = VideoUrl;
+ return IsVideoUrl;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? imageUrl = null,
- global::System.Func? audioUrl = null,
- global::System.Func? videoUrl = null,
+ global::System.Func? text = null,
+ global::System.Func? imageUrl = null,
+ global::System.Func? audioUrl = null,
+ global::System.Func? videoUrl = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? imageUrl = null,
- global::System.Action? audioUrl = null,
- global::System.Action? videoUrl = null,
+ global::System.Action? text = null,
+
+ global::System.Action? imageUrl = null,
+
+ global::System.Action? audioUrl = null,
+
+ global::System.Action? videoUrl = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImageUrl)
+ {
+ imageUrl?.Invoke(ImageUrl!);
+ }
+ else if (IsAudioUrl)
+ {
+ audioUrl?.Invoke(AudioUrl!);
+ }
+ else if (IsVideoUrl)
+ {
+ videoUrl?.Invoke(VideoUrl!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? imageUrl = null,
+ global::System.Action? audioUrl = null,
+ global::System.Action? videoUrl = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem.g.cs
index 57b8d95..bd564d3 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsIngestion => Ingestion != null;
+ ///
+ ///
+ ///
+ public bool TryPickIngestion(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.StoreIngestionEvent? value)
+ {
+ value = Ingestion;
+ return IsIngestion;
+ }
+
///
/// Represents a search event in a vector store.
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsSearch => Search != null;
+ ///
+ ///
+ ///
+ public bool TryPickSearch(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.StoreSearchEvent? value)
+ {
+ value = Search;
+ return IsSearch;
+ }
+
///
/// Represents an agentic search trace in a vector store.
/// Unlike StoreSearchEvent, this captures the full sequence of tool calls the
@@ -67,6 +93,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgenticSearch))]
#endif
public bool IsAgenticSearch => AgenticSearch != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickAgenticSearch(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.StoreAgenticSearchEvent? value)
+ {
+ value = AgenticSearch;
+ return IsAgenticSearch;
+ }
///
///
///
@@ -168,9 +207,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? ingestion = null,
- global::System.Func? search = null,
- global::System.Func? agenticSearch = null,
+ global::System.Func? ingestion = null,
+ global::System.Func? search = null,
+ global::System.Func? agenticSearch = null,
bool validate = true)
{
if (validate)
@@ -198,9 +237,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? ingestion = null,
- global::System.Action? search = null,
- global::System.Action? agenticSearch = null,
+ global::System.Action? ingestion = null,
+
+ global::System.Action? search = null,
+
+ global::System.Action? agenticSearch = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsIngestion)
+ {
+ ingestion?.Invoke(Ingestion!);
+ }
+ else if (IsSearch)
+ {
+ search?.Invoke(Search!);
+ }
+ else if (IsAgenticSearch)
+ {
+ agenticSearch?.Invoke(AgenticSearch!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? ingestion = null,
+ global::System.Action? search = null,
+ global::System.Action? agenticSearch = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem2.g.cs
index 1001a2e..deb6899 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem2.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredTextInputChunk? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsImageUrl => ImageUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredImageUrlInputChunk? value)
+ {
+ value = ImageUrl;
+ return IsImageUrl;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsAudioUrl => AudioUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickAudioUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredAudioUrlInputChunk? value)
+ {
+ value = AudioUrl;
+ return IsAudioUrl;
+ }
+
///
///
///
@@ -81,6 +120,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VideoUrl))]
#endif
public bool IsVideoUrl => VideoUrl != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickVideoUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniCoreStoreModelsChunkTypesScoredVideoUrlInputChunk? value)
+ {
+ value = VideoUrl;
+ return IsVideoUrl;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? imageUrl = null,
- global::System.Func? audioUrl = null,
- global::System.Func? videoUrl = null,
+ global::System.Func? text = null,
+ global::System.Func? imageUrl = null,
+ global::System.Func? audioUrl = null,
+ global::System.Func? videoUrl = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? imageUrl = null,
- global::System.Action? audioUrl = null,
- global::System.Action? videoUrl = null,
+ global::System.Action? text = null,
+
+ global::System.Action? imageUrl = null,
+
+ global::System.Action? audioUrl = null,
+
+ global::System.Action? videoUrl = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImageUrl)
+ {
+ imageUrl?.Invoke(ImageUrl!);
+ }
+ else if (IsAudioUrl)
+ {
+ audioUrl?.Invoke(AudioUrl!);
+ }
+ else if (IsVideoUrl)
+ {
+ videoUrl?.Invoke(VideoUrl!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? imageUrl = null,
+ global::System.Action? audioUrl = null,
+ global::System.Action? videoUrl = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem3.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem3.g.cs
index 48874a1..24bf15c 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem3.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.DataItem3.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
/// Scored image chunk for deprecated API.
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsImageUrl => ImageUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredImageUrlInputChunk? value)
+ {
+ value = ImageUrl;
+ return IsImageUrl;
+ }
+
///
/// Scored audio chunk for deprecated API.
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsAudioUrl => AudioUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickAudioUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredAudioUrlInputChunk? value)
+ {
+ value = AudioUrl;
+ return IsAudioUrl;
+ }
+
///
/// Scored video chunk for deprecated API.
///
@@ -81,6 +120,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VideoUrl))]
#endif
public bool IsVideoUrl => VideoUrl != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickVideoUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MxbaiOmniApiRoutesV1DeprecatedVectorStoresModelsScoredVideoUrlInputChunk? value)
+ {
+ value = VideoUrl;
+ return IsVideoUrl;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? imageUrl = null,
- global::System.Func? audioUrl = null,
- global::System.Func? videoUrl = null,
+ global::System.Func? text = null,
+ global::System.Func? imageUrl = null,
+ global::System.Func? audioUrl = null,
+ global::System.Func? videoUrl = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? imageUrl = null,
- global::System.Action? audioUrl = null,
- global::System.Action? videoUrl = null,
+ global::System.Action? text = null,
+
+ global::System.Action? imageUrl = null,
+
+ global::System.Action? audioUrl = null,
+
+ global::System.Action? videoUrl = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImageUrl)
+ {
+ imageUrl?.Invoke(ImageUrl!);
+ }
+ else if (IsAudioUrl)
+ {
+ audioUrl?.Invoke(AudioUrl!);
+ }
+ else if (IsVideoUrl)
+ {
+ videoUrl?.Invoke(VideoUrl!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? imageUrl = null,
+ global::System.Action? audioUrl = null,
+ global::System.Action? videoUrl = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule.g.cs
index 06614a4..ac3468b 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsQueryString => QueryString != null;
+ ///
+ ///
+ ///
+ public bool TryPickQueryString(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.QueryStringSubstitutionRule? value)
+ {
+ value = QueryString;
+ return IsQueryString;
+ }
+
///
/// Represents a regex query substitution rule for a vector store search.
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsQueryRegex => QueryRegex != null;
+ ///
+ ///
+ ///
+ public bool TryPickQueryRegex(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.QueryRegexSubstitutionRule? value)
+ {
+ value = QueryRegex;
+ return IsQueryRegex;
+ }
+
///
/// Represents a chunk search result rule for a vector store search.
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsChunkSearchResult => ChunkSearchResult != null;
+ ///
+ ///
+ ///
+ public bool TryPickChunkSearchResult(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.ChunkSearchResultRule? value)
+ {
+ value = ChunkSearchResult;
+ return IsChunkSearchResult;
+ }
+
///
/// Represents a file search result rule for a vector store search.
///
@@ -81,6 +120,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchResult))]
#endif
public bool IsFileSearchResult => FileSearchResult != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFileSearchResult(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.FileSearchResultRule? value)
+ {
+ value = FileSearchResult;
+ return IsFileSearchResult;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? queryString = null,
- global::System.Func? queryRegex = null,
- global::System.Func? chunkSearchResult = null,
- global::System.Func? fileSearchResult = null,
+ global::System.Func? queryString = null,
+ global::System.Func? queryRegex = null,
+ global::System.Func? chunkSearchResult = null,
+ global::System.Func? fileSearchResult = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? queryString = null,
- global::System.Action? queryRegex = null,
- global::System.Action? chunkSearchResult = null,
- global::System.Action? fileSearchResult = null,
+ global::System.Action? queryString = null,
+
+ global::System.Action? queryRegex = null,
+
+ global::System.Action? chunkSearchResult = null,
+
+ global::System.Action? fileSearchResult = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsQueryString)
+ {
+ queryString?.Invoke(QueryString!);
+ }
+ else if (IsQueryRegex)
+ {
+ queryRegex?.Invoke(QueryRegex!);
+ }
+ else if (IsChunkSearchResult)
+ {
+ chunkSearchResult?.Invoke(ChunkSearchResult!);
+ }
+ else if (IsFileSearchResult)
+ {
+ fileSearchResult?.Invoke(FileSearchResult!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? queryString = null,
+ global::System.Action? queryRegex = null,
+ global::System.Action? chunkSearchResult = null,
+ global::System.Action? fileSearchResult = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule2.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule2.g.cs
index ea0c327..f1b901f 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule2.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.DeletedRule2.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsQueryString => QueryString != null;
+ ///
+ ///
+ ///
+ public bool TryPickQueryString(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.QueryStringSubstitutionRule? value)
+ {
+ value = QueryString;
+ return IsQueryString;
+ }
+
///
/// Represents a regex query substitution rule for a vector store search.
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsQueryRegex => QueryRegex != null;
+ ///
+ ///
+ ///
+ public bool TryPickQueryRegex(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.QueryRegexSubstitutionRule? value)
+ {
+ value = QueryRegex;
+ return IsQueryRegex;
+ }
+
///
/// Represents a chunk search result rule for a vector store search.
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsChunkSearchResult => ChunkSearchResult != null;
+ ///
+ ///
+ ///
+ public bool TryPickChunkSearchResult(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.ChunkSearchResultRule? value)
+ {
+ value = ChunkSearchResult;
+ return IsChunkSearchResult;
+ }
+
///
/// Represents a file search result rule for a vector store search.
///
@@ -81,6 +120,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearchResult))]
#endif
public bool IsFileSearchResult => FileSearchResult != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFileSearchResult(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.FileSearchResultRule? value)
+ {
+ value = FileSearchResult;
+ return IsFileSearchResult;
+ }
///
///
///
@@ -204,10 +256,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? queryString = null,
- global::System.Func? queryRegex = null,
- global::System.Func? chunkSearchResult = null,
- global::System.Func? fileSearchResult = null,
+ global::System.Func? queryString = null,
+ global::System.Func? queryRegex = null,
+ global::System.Func? chunkSearchResult = null,
+ global::System.Func? fileSearchResult = null,
bool validate = true)
{
if (validate)
@@ -239,10 +291,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? queryString = null,
- global::System.Action? queryRegex = null,
- global::System.Action? chunkSearchResult = null,
- global::System.Action? fileSearchResult = null,
+ global::System.Action? queryString = null,
+
+ global::System.Action? queryRegex = null,
+
+ global::System.Action? chunkSearchResult = null,
+
+ global::System.Action? fileSearchResult = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsQueryString)
+ {
+ queryString?.Invoke(QueryString!);
+ }
+ else if (IsQueryRegex)
+ {
+ queryRegex?.Invoke(QueryRegex!);
+ }
+ else if (IsChunkSearchResult)
+ {
+ chunkSearchResult?.Invoke(ChunkSearchResult!);
+ }
+ else if (IsFileSearchResult)
+ {
+ fileSearchResult?.Invoke(FileSearchResult!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? queryString = null,
+ global::System.Action? queryRegex = null,
+ global::System.Action? chunkSearchResult = null,
+ global::System.Action? fileSearchResult = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.EmbeddingItem.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.EmbeddingItem.g.cs
index 6f89468..45329f3 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.EmbeddingItem.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.EmbeddingItem.g.cs
@@ -26,6 +26,19 @@ namespace Mixedbread
#endif
public bool IsEmbeddingItemVariant1 => EmbeddingItemVariant1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickEmbeddingItemVariant1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::System.Collections.Generic.IList? value)
+ {
+ value = EmbeddingItemVariant1;
+ return IsEmbeddingItemVariant1;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Mixedbread
#endif
public bool IsEmbeddingItemVariant2 => EmbeddingItemVariant2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickEmbeddingItemVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::System.Collections.Generic.IList? value)
+ {
+ value = EmbeddingItemVariant2;
+ return IsEmbeddingItemVariant2;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace Mixedbread
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(EmbeddingItemVariant3))]
#endif
public bool IsEmbeddingItemVariant3 => EmbeddingItemVariant3 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickEmbeddingItemVariant3(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out string? value)
+ {
+ value = EmbeddingItemVariant3;
+ return IsEmbeddingItemVariant3;
+ }
///
///
///
@@ -121,9 +160,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func?, TResult>? embeddingItemVariant1 = null,
- global::System.Func?, TResult>? embeddingItemVariant2 = null,
- global::System.Func? embeddingItemVariant3 = null,
+ global::System.Func, TResult>? embeddingItemVariant1 = null,
+ global::System.Func, TResult>? embeddingItemVariant2 = null,
+ global::System.Func? embeddingItemVariant3 = null,
bool validate = true)
{
if (validate)
@@ -151,9 +190,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action?>? embeddingItemVariant1 = null,
- global::System.Action?>? embeddingItemVariant2 = null,
- global::System.Action? embeddingItemVariant3 = null,
+ global::System.Action>? embeddingItemVariant1 = null,
+
+ global::System.Action>? embeddingItemVariant2 = null,
+
+ global::System.Action? embeddingItemVariant3 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsEmbeddingItemVariant1)
+ {
+ embeddingItemVariant1?.Invoke(EmbeddingItemVariant1!);
+ }
+ else if (IsEmbeddingItemVariant2)
+ {
+ embeddingItemVariant2?.Invoke(EmbeddingItemVariant2!);
+ }
+ else if (IsEmbeddingItemVariant3)
+ {
+ embeddingItemVariant3?.Invoke(EmbeddingItemVariant3!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action>? embeddingItemVariant1 = null,
+ global::System.Action>? embeddingItemVariant2 = null,
+ global::System.Action? embeddingItemVariant3 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant1.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant1.g.cs
index d4e08da..c22e26d 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant1.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant1.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsMarkdown => Markdown != null;
+ ///
+ ///
+ ///
+ public bool TryPickMarkdown(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MarkdownChunkGeneratedMetadata? value)
+ {
+ value = Markdown;
+ return IsMarkdown;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.TextChunkGeneratedMetadata? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsPdf => Pdf != null;
+ ///
+ ///
+ ///
+ public bool TryPickPdf(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.PDFChunkGeneratedMetadata? value)
+ {
+ value = Pdf;
+ return IsPdf;
+ }
+
///
///
///
@@ -82,6 +121,19 @@ namespace Mixedbread
#endif
public bool IsCode => Code != null;
+ ///
+ ///
+ ///
+ public bool TryPickCode(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.CodeChunkGeneratedMetadata? value)
+ {
+ value = Code;
+ return IsCode;
+ }
+
///
///
///
@@ -99,6 +151,19 @@ namespace Mixedbread
#endif
public bool IsAudio => Audio != null;
+ ///
+ ///
+ ///
+ public bool TryPickAudio(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.AudioChunkGeneratedMetadata? value)
+ {
+ value = Audio;
+ return IsAudio;
+ }
+
///
///
///
@@ -116,6 +181,19 @@ namespace Mixedbread
#endif
public bool IsVideo => Video != null;
+ ///
+ ///
+ ///
+ public bool TryPickVideo(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.VideoChunkGeneratedMetadata? value)
+ {
+ value = Video;
+ return IsVideo;
+ }
+
///
///
///
@@ -132,6 +210,19 @@ namespace Mixedbread
[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::Mixedbread.ImageChunkGeneratedMetadata? value)
+ {
+ value = Image;
+ return IsImage;
+ }
///
///
///
@@ -321,13 +412,13 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? markdown = null,
- global::System.Func? text = null,
- global::System.Func? pdf = null,
- global::System.Func? code = null,
- global::System.Func? audio = null,
- global::System.Func? video = null,
- global::System.Func? image = null,
+ global::System.Func? markdown = null,
+ global::System.Func? text = null,
+ global::System.Func? pdf = null,
+ global::System.Func? code = null,
+ global::System.Func? audio = null,
+ global::System.Func? video = null,
+ global::System.Func? image = null,
bool validate = true)
{
if (validate)
@@ -371,13 +462,67 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? markdown = null,
- global::System.Action? text = null,
- global::System.Action? pdf = null,
- global::System.Action? code = null,
- global::System.Action? audio = null,
- global::System.Action? video = null,
- global::System.Action? image = null,
+ global::System.Action? markdown = null,
+
+ global::System.Action? text = null,
+
+ global::System.Action? pdf = null,
+
+ global::System.Action? code = null,
+
+ global::System.Action? audio = null,
+
+ global::System.Action? video = null,
+
+ global::System.Action? image = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsMarkdown)
+ {
+ markdown?.Invoke(Markdown!);
+ }
+ else if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsPdf)
+ {
+ pdf?.Invoke(Pdf!);
+ }
+ else if (IsCode)
+ {
+ code?.Invoke(Code!);
+ }
+ else if (IsAudio)
+ {
+ audio?.Invoke(Audio!);
+ }
+ else if (IsVideo)
+ {
+ video?.Invoke(Video!);
+ }
+ else if (IsImage)
+ {
+ image?.Invoke(Image!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? markdown = null,
+ global::System.Action? text = null,
+ global::System.Action? pdf = null,
+ global::System.Action? code = null,
+ global::System.Action? audio = null,
+ global::System.Action? video = null,
+ global::System.Action? image = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant110.g.cs b/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant110.g.cs
index 8c8cd3a..19c0a0c 100644
--- a/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant110.g.cs
+++ b/src/libs/Mixedbread/Generated/Mixedbread.Models.GeneratedMetadataVariant110.g.cs
@@ -31,6 +31,19 @@ namespace Mixedbread
#endif
public bool IsMarkdown => Markdown != null;
+ ///
+ ///
+ ///
+ public bool TryPickMarkdown(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.MarkdownChunkGeneratedMetadata? value)
+ {
+ value = Markdown;
+ return IsMarkdown;
+ }
+
///
///
///
@@ -48,6 +61,19 @@ namespace Mixedbread
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.TextChunkGeneratedMetadata? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -65,6 +91,19 @@ namespace Mixedbread
#endif
public bool IsPdf => Pdf != null;
+ ///
+ ///
+ ///
+ public bool TryPickPdf(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.PDFChunkGeneratedMetadata? value)
+ {
+ value = Pdf;
+ return IsPdf;
+ }
+
///
///
///
@@ -82,6 +121,19 @@ namespace Mixedbread
#endif
public bool IsCode => Code != null;
+ ///
+ ///
+ ///
+ public bool TryPickCode(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.CodeChunkGeneratedMetadata? value)
+ {
+ value = Code;
+ return IsCode;
+ }
+
///
///
///
@@ -99,6 +151,19 @@ namespace Mixedbread
#endif
public bool IsAudio => Audio != null;
+ ///
+ ///
+ ///
+ public bool TryPickAudio(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.AudioChunkGeneratedMetadata? value)
+ {
+ value = Audio;
+ return IsAudio;
+ }
+
///
///
///
@@ -116,6 +181,19 @@ namespace Mixedbread
#endif
public bool IsVideo => Video != null;
+ ///
+ ///
+ ///
+ public bool TryPickVideo(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Mixedbread.VideoChunkGeneratedMetadata? value)
+ {
+ value = Video;
+ return IsVideo;
+ }
+
///
///
///
@@ -132,6 +210,19 @@ namespace Mixedbread
[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::Mixedbread.ImageChunkGeneratedMetadata? value)
+ {
+ value = Image;
+ return IsImage;
+ }
///
///
///
@@ -321,13 +412,13 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? markdown = null,
- global::System.Func? text = null,
- global::System.Func? pdf = null,
- global::System.Func? code = null,
- global::System.Func? audio = null,
- global::System.Func? video = null,
- global::System.Func? image = null,
+ global::System.Func? markdown = null,
+ global::System.Func? text = null,
+ global::System.Func? pdf = null,
+ global::System.Func? code = null,
+ global::System.Func