diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.CreateSpeechUnderstandingResponse200.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.CreateSpeechUnderstandingResponse200.g.cs
index b9ebfef..1a089fc 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.CreateSpeechUnderstandingResponse200.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.CreateSpeechUnderstandingResponse200.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsLLMGatewayTranslationResponse => LLMGatewayTranslationResponse != null;
+ ///
+ ///
+ ///
+ public bool TryPickLLMGatewayTranslationResponse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.LLMGatewayTranslationResponse? value)
+ {
+ value = LLMGatewayTranslationResponse;
+ return IsLLMGatewayTranslationResponse;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsLLMGatewaySpeakerIdentificationResponse => LLMGatewaySpeakerIdentificationResponse != null;
+ ///
+ ///
+ ///
+ public bool TryPickLLMGatewaySpeakerIdentificationResponse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse? value)
+ {
+ value = LLMGatewaySpeakerIdentificationResponse;
+ return IsLLMGatewaySpeakerIdentificationResponse;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LLMGatewayCustomFormattingResponse))]
#endif
public bool IsLLMGatewayCustomFormattingResponse => LLMGatewayCustomFormattingResponse != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickLLMGatewayCustomFormattingResponse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.LLMGatewayCustomFormattingResponse? value)
+ {
+ value = LLMGatewayCustomFormattingResponse;
+ return IsLLMGatewayCustomFormattingResponse;
+ }
///
///
///
@@ -157,9 +196,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? lLMGatewayTranslationResponse = null,
- global::System.Func? lLMGatewaySpeakerIdentificationResponse = null,
- global::System.Func? lLMGatewayCustomFormattingResponse = null,
+ global::System.Func? lLMGatewayTranslationResponse = null,
+ global::System.Func? lLMGatewaySpeakerIdentificationResponse = null,
+ global::System.Func? lLMGatewayCustomFormattingResponse = null,
bool validate = true)
{
if (validate)
@@ -187,9 +226,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? lLMGatewayTranslationResponse = null,
- global::System.Action? lLMGatewaySpeakerIdentificationResponse = null,
- global::System.Action? lLMGatewayCustomFormattingResponse = null,
+ global::System.Action? lLMGatewayTranslationResponse = null,
+
+ global::System.Action? lLMGatewaySpeakerIdentificationResponse = null,
+
+ global::System.Action? lLMGatewayCustomFormattingResponse = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsLLMGatewayTranslationResponse)
+ {
+ lLMGatewayTranslationResponse?.Invoke(LLMGatewayTranslationResponse!);
+ }
+ else if (IsLLMGatewaySpeakerIdentificationResponse)
+ {
+ lLMGatewaySpeakerIdentificationResponse?.Invoke(LLMGatewaySpeakerIdentificationResponse!);
+ }
+ else if (IsLLMGatewayCustomFormattingResponse)
+ {
+ lLMGatewayCustomFormattingResponse?.Invoke(LLMGatewayCustomFormattingResponse!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? lLMGatewayTranslationResponse = null,
+ global::System.Action? lLMGatewaySpeakerIdentificationResponse = null,
+ global::System.Action? lLMGatewayCustomFormattingResponse = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.Message.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.Message.g.cs
index 3ea2731..3982755 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.Message.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.Message.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsMessageVariant1 => MessageVariant1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickMessageVariant1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.MessageVariant1? value)
+ {
+ value = MessageVariant1;
+ return IsMessageVariant1;
+ }
+
///
/// assistant variant
///
@@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsMessageVariant2 => MessageVariant2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickMessageVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.MessageVariant2? value)
+ {
+ value = MessageVariant2;
+ return IsMessageVariant2;
+ }
+
///
/// system variant
///
@@ -60,6 +86,19 @@ namespace AssemblyAI
#endif
public bool IsMessageVariant3 => MessageVariant3 != null;
+ ///
+ ///
+ ///
+ public bool TryPickMessageVariant3(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.MessageVariant3? value)
+ {
+ value = MessageVariant3;
+ return IsMessageVariant3;
+ }
+
///
/// tool variant
///
@@ -76,6 +115,19 @@ namespace AssemblyAI
[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::AssemblyAI.MessageVariant4? value)
+ {
+ value = Tool;
+ return IsTool;
+ }
///
///
///
@@ -196,10 +248,10 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? messageVariant1 = null,
- global::System.Func? messageVariant2 = null,
- global::System.Func? messageVariant3 = null,
- global::System.Func? tool = null,
+ global::System.Func? messageVariant1 = null,
+ global::System.Func? messageVariant2 = null,
+ global::System.Func? messageVariant3 = null,
+ global::System.Func? tool = null,
bool validate = true)
{
if (validate)
@@ -231,10 +283,46 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? messageVariant1 = null,
- global::System.Action? messageVariant2 = null,
- global::System.Action? messageVariant3 = null,
- global::System.Action? tool = null,
+ global::System.Action? messageVariant1 = null,
+
+ global::System.Action? messageVariant2 = null,
+
+ global::System.Action? messageVariant3 = null,
+
+ global::System.Action? tool = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsMessageVariant1)
+ {
+ messageVariant1?.Invoke(MessageVariant1!);
+ }
+ else if (IsMessageVariant2)
+ {
+ messageVariant2?.Invoke(MessageVariant2!);
+ }
+ else if (IsMessageVariant3)
+ {
+ messageVariant3?.Invoke(MessageVariant3!);
+ }
+ else if (IsTool)
+ {
+ tool?.Invoke(Tool!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? messageVariant1 = null,
+ global::System.Action? messageVariant2 = null,
+ global::System.Action? messageVariant3 = null,
+ global::System.Action? tool = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.ToolChoice.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.ToolChoice.g.cs
index be20f89..73ecb03 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.ToolChoice.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.ToolChoice.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsToolChoice0 => ToolChoice0 != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolChoice0(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.ToolChoice0? value)
+ {
+ value = ToolChoice0;
+ return IsToolChoice0;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolChoice1))]
#endif
public bool IsToolChoice1 => ToolChoice1 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickToolChoice1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.ToolChoice1? value)
+ {
+ value = ToolChoice1;
+ return IsToolChoice1;
+ }
///
///
///
@@ -119,7 +145,7 @@ public bool Validate()
///
public TResult? Match(
global::System.Func? toolChoice0 = null,
- global::System.Func? toolChoice1 = null,
+ global::System.Func? toolChoice1 = null,
bool validate = true)
{
if (validate)
@@ -144,7 +170,31 @@ public bool Validate()
///
public void Match(
global::System.Action? toolChoice0 = null,
- global::System.Action? toolChoice1 = null,
+
+ global::System.Action? toolChoice1 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsToolChoice0)
+ {
+ toolChoice0?.Invoke(ToolChoice0!);
+ }
+ else if (IsToolChoice1)
+ {
+ toolChoice1?.Invoke(ToolChoice1!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? toolChoice0 = null,
+ global::System.Action? toolChoice1 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs
index b20da32..c68d30f 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstandingRequest.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsTranslationRequestBody => TranslationRequestBody != null;
+ ///
+ ///
+ ///
+ public bool TryPickTranslationRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.TranslationRequestBody? value)
+ {
+ value = TranslationRequestBody;
+ return IsTranslationRequestBody;
+ }
+
///
/// Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification).
///
@@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsSpeakerIdentificationRequestBody => SpeakerIdentificationRequestBody != null;
+ ///
+ ///
+ ///
+ public bool TryPickSpeakerIdentificationRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.SpeakerIdentificationRequestBody? value)
+ {
+ value = SpeakerIdentificationRequestBody;
+ return IsSpeakerIdentificationRequestBody;
+ }
+
///
/// Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting).
///
@@ -59,6 +85,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomFormattingRequestBody))]
#endif
public bool IsCustomFormattingRequestBody => CustomFormattingRequestBody != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomFormattingRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.CustomFormattingRequestBody? value)
+ {
+ value = CustomFormattingRequestBody;
+ return IsCustomFormattingRequestBody;
+ }
///
///
///
@@ -157,9 +196,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? translationRequestBody = null,
- global::System.Func? speakerIdentificationRequestBody = null,
- global::System.Func? customFormattingRequestBody = null,
+ global::System.Func? translationRequestBody = null,
+ global::System.Func? speakerIdentificationRequestBody = null,
+ global::System.Func? customFormattingRequestBody = null,
bool validate = true)
{
if (validate)
@@ -187,9 +226,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? translationRequestBody = null,
- global::System.Action? speakerIdentificationRequestBody = null,
- global::System.Action? customFormattingRequestBody = null,
+ global::System.Action? translationRequestBody = null,
+
+ global::System.Action? speakerIdentificationRequestBody = null,
+
+ global::System.Action? customFormattingRequestBody = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsTranslationRequestBody)
+ {
+ translationRequestBody?.Invoke(TranslationRequestBody!);
+ }
+ else if (IsSpeakerIdentificationRequestBody)
+ {
+ speakerIdentificationRequestBody?.Invoke(SpeakerIdentificationRequestBody!);
+ }
+ else if (IsCustomFormattingRequestBody)
+ {
+ customFormattingRequestBody?.Invoke(CustomFormattingRequestBody!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? translationRequestBody = null,
+ global::System.Action? speakerIdentificationRequestBody = null,
+ global::System.Action? customFormattingRequestBody = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingRequest.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingRequest.g.cs
index 5e06bcf..a0b32b9 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingRequest.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingRequest.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsTranslationRequestBody => TranslationRequestBody != null;
+ ///
+ ///
+ ///
+ public bool TryPickTranslationRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.TranslationRequestBody? value)
+ {
+ value = TranslationRequestBody;
+ return IsTranslationRequestBody;
+ }
+
///
/// Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification).
///
@@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsSpeakerIdentificationRequestBody => SpeakerIdentificationRequestBody != null;
+ ///
+ ///
+ ///
+ public bool TryPickSpeakerIdentificationRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.SpeakerIdentificationRequestBody? value)
+ {
+ value = SpeakerIdentificationRequestBody;
+ return IsSpeakerIdentificationRequestBody;
+ }
+
///
/// Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting).
///
@@ -59,6 +85,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomFormattingRequestBody))]
#endif
public bool IsCustomFormattingRequestBody => CustomFormattingRequestBody != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomFormattingRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.CustomFormattingRequestBody? value)
+ {
+ value = CustomFormattingRequestBody;
+ return IsCustomFormattingRequestBody;
+ }
///
///
///
@@ -157,9 +196,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? translationRequestBody = null,
- global::System.Func? speakerIdentificationRequestBody = null,
- global::System.Func? customFormattingRequestBody = null,
+ global::System.Func? translationRequestBody = null,
+ global::System.Func? speakerIdentificationRequestBody = null,
+ global::System.Func? customFormattingRequestBody = null,
bool validate = true)
{
if (validate)
@@ -187,9 +226,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? translationRequestBody = null,
- global::System.Action? speakerIdentificationRequestBody = null,
- global::System.Action? customFormattingRequestBody = null,
+ global::System.Action? translationRequestBody = null,
+
+ global::System.Action? speakerIdentificationRequestBody = null,
+
+ global::System.Action? customFormattingRequestBody = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsTranslationRequestBody)
+ {
+ translationRequestBody?.Invoke(TranslationRequestBody!);
+ }
+ else if (IsSpeakerIdentificationRequestBody)
+ {
+ speakerIdentificationRequestBody?.Invoke(SpeakerIdentificationRequestBody!);
+ }
+ else if (IsCustomFormattingRequestBody)
+ {
+ customFormattingRequestBody?.Invoke(CustomFormattingRequestBody!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? translationRequestBody = null,
+ global::System.Action? speakerIdentificationRequestBody = null,
+ global::System.Action? customFormattingRequestBody = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingResponse.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingResponse.g.cs
index 22349ba..553fce8 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingResponse.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstandingResponse.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsTranslationResponse => TranslationResponse != null;
+ ///
+ ///
+ ///
+ public bool TryPickTranslationResponse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.TranslationResponse? value)
+ {
+ value = TranslationResponse;
+ return IsTranslationResponse;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsSpeakerIdentificationResponse => SpeakerIdentificationResponse != null;
+ ///
+ ///
+ ///
+ public bool TryPickSpeakerIdentificationResponse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.SpeakerIdentificationResponse? value)
+ {
+ value = SpeakerIdentificationResponse;
+ return IsSpeakerIdentificationResponse;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomFormattingResponse))]
#endif
public bool IsCustomFormattingResponse => CustomFormattingResponse != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomFormattingResponse(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.CustomFormattingResponse? value)
+ {
+ value = CustomFormattingResponse;
+ return IsCustomFormattingResponse;
+ }
///
///
///
@@ -157,9 +196,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? translationResponse = null,
- global::System.Func? speakerIdentificationResponse = null,
- global::System.Func? customFormattingResponse = null,
+ global::System.Func? translationResponse = null,
+ global::System.Func? speakerIdentificationResponse = null,
+ global::System.Func? customFormattingResponse = null,
bool validate = true)
{
if (validate)
@@ -187,9 +226,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? translationResponse = null,
- global::System.Action? speakerIdentificationResponse = null,
- global::System.Action? customFormattingResponse = null,
+ global::System.Action? translationResponse = null,
+
+ global::System.Action? speakerIdentificationResponse = null,
+
+ global::System.Action? customFormattingResponse = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsTranslationResponse)
+ {
+ translationResponse?.Invoke(TranslationResponse!);
+ }
+ else if (IsSpeakerIdentificationResponse)
+ {
+ speakerIdentificationResponse?.Invoke(SpeakerIdentificationResponse!);
+ }
+ else if (IsCustomFormattingResponse)
+ {
+ customFormattingResponse?.Invoke(CustomFormattingResponse!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? translationResponse = null,
+ global::System.Action? speakerIdentificationResponse = null,
+ global::System.Action? customFormattingResponse = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UnderstandingRequestSpeechUnderstandingRequest.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UnderstandingRequestSpeechUnderstandingRequest.g.cs
index 9a421c4..afa652a 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UnderstandingRequestSpeechUnderstandingRequest.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UnderstandingRequestSpeechUnderstandingRequest.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsTranslationRequestBody => TranslationRequestBody != null;
+ ///
+ ///
+ ///
+ public bool TryPickTranslationRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.TranslationRequestBody? value)
+ {
+ value = TranslationRequestBody;
+ return IsTranslationRequestBody;
+ }
+
///
/// Request body for [Speaker Identification](https://www.assemblyai.com/docs/speech-understanding/speaker-identification).
///
@@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsSpeakerIdentificationRequestBody => SpeakerIdentificationRequestBody != null;
+ ///
+ ///
+ ///
+ public bool TryPickSpeakerIdentificationRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.SpeakerIdentificationRequestBody? value)
+ {
+ value = SpeakerIdentificationRequestBody;
+ return IsSpeakerIdentificationRequestBody;
+ }
+
///
/// Request body for [Custom Formatting](https://www.assemblyai.com/docs/speech-understanding/custom-formatting).
///
@@ -59,6 +85,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomFormattingRequestBody))]
#endif
public bool IsCustomFormattingRequestBody => CustomFormattingRequestBody != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCustomFormattingRequestBody(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.CustomFormattingRequestBody? value)
+ {
+ value = CustomFormattingRequestBody;
+ return IsCustomFormattingRequestBody;
+ }
///
///
///
@@ -157,9 +196,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? translationRequestBody = null,
- global::System.Func? speakerIdentificationRequestBody = null,
- global::System.Func? customFormattingRequestBody = null,
+ global::System.Func? translationRequestBody = null,
+ global::System.Func? speakerIdentificationRequestBody = null,
+ global::System.Func? customFormattingRequestBody = null,
bool validate = true)
{
if (validate)
@@ -187,9 +226,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? translationRequestBody = null,
- global::System.Action? speakerIdentificationRequestBody = null,
- global::System.Action? customFormattingRequestBody = null,
+ global::System.Action? translationRequestBody = null,
+
+ global::System.Action? speakerIdentificationRequestBody = null,
+
+ global::System.Action? customFormattingRequestBody = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsTranslationRequestBody)
+ {
+ translationRequestBody?.Invoke(TranslationRequestBody!);
+ }
+ else if (IsSpeakerIdentificationRequestBody)
+ {
+ speakerIdentificationRequestBody?.Invoke(SpeakerIdentificationRequestBody!);
+ }
+ else if (IsCustomFormattingRequestBody)
+ {
+ customFormattingRequestBody?.Invoke(CustomFormattingRequestBody!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? translationRequestBody = null,
+ global::System.Action? speakerIdentificationRequestBody = null,
+ global::System.Action? customFormattingRequestBody = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UserAssistantSystemMessageContent.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UserAssistantSystemMessageContent.g.cs
index 25314d0..fca3692 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UserAssistantSystemMessageContent.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.UserAssistantSystemMessageContent.g.cs
@@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsUserAssistantSystemMessageContentVariant1 => UserAssistantSystemMessageContentVariant1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickUserAssistantSystemMessageContentVariant1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out string? value)
+ {
+ value = UserAssistantSystemMessageContentVariant1;
+ return IsUserAssistantSystemMessageContentVariant1;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserAssistantSystemMessageContent1))]
#endif
public bool IsUserAssistantSystemMessageContent1 => UserAssistantSystemMessageContent1 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickUserAssistantSystemMessageContent1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::System.Collections.Generic.IList? value)
+ {
+ value = UserAssistantSystemMessageContent1;
+ return IsUserAssistantSystemMessageContent1;
+ }
///
///
///
@@ -100,8 +126,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? userAssistantSystemMessageContentVariant1 = null,
- global::System.Func?, TResult>? userAssistantSystemMessageContent1 = null,
+ global::System.Func? userAssistantSystemMessageContentVariant1 = null,
+ global::System.Func, TResult>? userAssistantSystemMessageContent1 = null,
bool validate = true)
{
if (validate)
@@ -125,8 +151,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? userAssistantSystemMessageContentVariant1 = null,
- global::System.Action?>? userAssistantSystemMessageContent1 = null,
+ global::System.Action? userAssistantSystemMessageContentVariant1 = null,
+
+ global::System.Action>? userAssistantSystemMessageContent1 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsUserAssistantSystemMessageContentVariant1)
+ {
+ userAssistantSystemMessageContentVariant1?.Invoke(UserAssistantSystemMessageContentVariant1!);
+ }
+ else if (IsUserAssistantSystemMessageContent1)
+ {
+ userAssistantSystemMessageContent1?.Invoke(UserAssistantSystemMessageContent1!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? userAssistantSystemMessageContentVariant1 = null,
+ global::System.Action>? userAssistantSystemMessageContent1 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.OneOf.2.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.OneOf.2.g.cs
index 8767365..3b70b5c 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.OneOf.2.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.OneOf.2.g.cs
@@ -25,6 +25,19 @@ namespace AssemblyAI
#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 AssemblyAI
[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/AssemblyAI/Generated/AssemblyAI.Realtime.Models.ServerEvent.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.Models.ServerEvent.g.cs
index c218963..4231877 100644
--- a/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.Models.ServerEvent.g.cs
+++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.Models.ServerEvent.g.cs
@@ -31,6 +31,19 @@ namespace AssemblyAI.Realtime
#endif
public bool IsBegin => Begin != null;
+ ///
+ ///
+ ///
+ public bool TryPickBegin(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.Realtime.SessionBeginsPayload? value)
+ {
+ value = Begin;
+ return IsBegin;
+ }
+
///
/// Turn-based transcription result.
///
@@ -48,6 +61,19 @@ namespace AssemblyAI.Realtime
#endif
public bool IsTurn => Turn != null;
+ ///
+ ///
+ ///
+ public bool TryPickTurn(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.Realtime.TurnPayload? value)
+ {
+ value = Turn;
+ return IsTurn;
+ }
+
///
/// Server event confirming session termination with statistics.
///
@@ -64,6 +90,19 @@ namespace AssemblyAI.Realtime
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Termination))]
#endif
public bool IsTermination => Termination != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickTermination(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::AssemblyAI.Realtime.TerminationPayload? value)
+ {
+ value = Termination;
+ return IsTermination;
+ }
///
///
///
@@ -165,9 +204,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? begin = null,
- global::System.Func? turn = null,
- global::System.Func? termination = null,
+ global::System.Func? begin = null,
+ global::System.Func? turn = null,
+ global::System.Func? termination = null,
bool validate = true)
{
if (validate)
@@ -195,9 +234,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? begin = null,
- global::System.Action? turn = null,
- global::System.Action? termination = null,
+ global::System.Action? begin = null,
+
+ global::System.Action? turn = null,
+
+ global::System.Action? termination = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBegin)
+ {
+ begin?.Invoke(Begin!);
+ }
+ else if (IsTurn)
+ {
+ turn?.Invoke(Turn!);
+ }
+ else if (IsTermination)
+ {
+ termination?.Invoke(Termination!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? begin = null,
+ global::System.Action? turn = null,
+ global::System.Action? termination = null,
bool validate = true)
{
if (validate)