Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsLLMGatewayTranslationResponse => LLMGatewayTranslationResponse != null;

/// <summary>
///
/// </summary>
public bool TryPickLLMGatewayTranslationResponse(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.LLMGatewayTranslationResponse? value)
{
value = LLMGatewayTranslationResponse;
return IsLLMGatewayTranslationResponse;
}

/// <summary>
///
/// </summary>
Expand All @@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsLLMGatewaySpeakerIdentificationResponse => LLMGatewaySpeakerIdentificationResponse != null;

/// <summary>
///
/// </summary>
public bool TryPickLLMGatewaySpeakerIdentificationResponse(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse? value)
{
value = LLMGatewaySpeakerIdentificationResponse;
return IsLLMGatewaySpeakerIdentificationResponse;
}

/// <summary>
///
/// </summary>
Expand All @@ -59,6 +85,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LLMGatewayCustomFormattingResponse))]
#endif
public bool IsLLMGatewayCustomFormattingResponse => LLMGatewayCustomFormattingResponse != null;

/// <summary>
///
/// </summary>
public bool TryPickLLMGatewayCustomFormattingResponse(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.LLMGatewayCustomFormattingResponse? value)
{
value = LLMGatewayCustomFormattingResponse;
return IsLLMGatewayCustomFormattingResponse;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -157,9 +196,9 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LLMGatewayTranslationResponse?, TResult>? lLMGatewayTranslationResponse = null,
global::System.Func<global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse?, TResult>? lLMGatewaySpeakerIdentificationResponse = null,
global::System.Func<global::AssemblyAI.LLMGatewayCustomFormattingResponse?, TResult>? lLMGatewayCustomFormattingResponse = null,
global::System.Func<global::AssemblyAI.LLMGatewayTranslationResponse, TResult>? lLMGatewayTranslationResponse = null,
global::System.Func<global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse, TResult>? lLMGatewaySpeakerIdentificationResponse = null,
global::System.Func<global::AssemblyAI.LLMGatewayCustomFormattingResponse, TResult>? lLMGatewayCustomFormattingResponse = null,
bool validate = true)
{
if (validate)
Expand Down Expand Up @@ -187,9 +226,39 @@ public bool Validate()
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LLMGatewayTranslationResponse?>? lLMGatewayTranslationResponse = null,
global::System.Action<global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse?>? lLMGatewaySpeakerIdentificationResponse = null,
global::System.Action<global::AssemblyAI.LLMGatewayCustomFormattingResponse?>? lLMGatewayCustomFormattingResponse = null,
global::System.Action<global::AssemblyAI.LLMGatewayTranslationResponse>? lLMGatewayTranslationResponse = null,

global::System.Action<global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse>? lLMGatewaySpeakerIdentificationResponse = null,

global::System.Action<global::AssemblyAI.LLMGatewayCustomFormattingResponse>? 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!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::AssemblyAI.LLMGatewayTranslationResponse>? lLMGatewayTranslationResponse = null,
global::System.Action<global::AssemblyAI.LLMGatewaySpeakerIdentificationResponse>? lLMGatewaySpeakerIdentificationResponse = null,
global::System.Action<global::AssemblyAI.LLMGatewayCustomFormattingResponse>? lLMGatewayCustomFormattingResponse = null,
bool validate = true)
{
if (validate)
Expand Down
104 changes: 96 additions & 8 deletions src/libs/AssemblyAI/Generated/AssemblyAI.Models.Message.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsMessageVariant1 => MessageVariant1 != null;

/// <summary>
///
/// </summary>
public bool TryPickMessageVariant1(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.MessageVariant1? value)
{
value = MessageVariant1;
return IsMessageVariant1;
}

/// <summary>
/// assistant variant
/// </summary>
Expand All @@ -43,6 +56,19 @@ namespace AssemblyAI
#endif
public bool IsMessageVariant2 => MessageVariant2 != null;

/// <summary>
///
/// </summary>
public bool TryPickMessageVariant2(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.MessageVariant2? value)
{
value = MessageVariant2;
return IsMessageVariant2;
}

/// <summary>
/// system variant
/// </summary>
Expand All @@ -60,6 +86,19 @@ namespace AssemblyAI
#endif
public bool IsMessageVariant3 => MessageVariant3 != null;

/// <summary>
///
/// </summary>
public bool TryPickMessageVariant3(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.MessageVariant3? value)
{
value = MessageVariant3;
return IsMessageVariant3;
}

/// <summary>
/// tool variant
/// </summary>
Expand All @@ -76,6 +115,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))]
#endif
public bool IsTool => Tool != null;

/// <summary>
///
/// </summary>
public bool TryPickTool(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.MessageVariant4? value)
{
value = Tool;
return IsTool;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -196,10 +248,10 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.MessageVariant1?, TResult>? messageVariant1 = null,
global::System.Func<global::AssemblyAI.MessageVariant2?, TResult>? messageVariant2 = null,
global::System.Func<global::AssemblyAI.MessageVariant3?, TResult>? messageVariant3 = null,
global::System.Func<global::AssemblyAI.MessageVariant4?, TResult>? tool = null,
global::System.Func<global::AssemblyAI.MessageVariant1, TResult>? messageVariant1 = null,
global::System.Func<global::AssemblyAI.MessageVariant2, TResult>? messageVariant2 = null,
global::System.Func<global::AssemblyAI.MessageVariant3, TResult>? messageVariant3 = null,
global::System.Func<global::AssemblyAI.MessageVariant4, TResult>? tool = null,
bool validate = true)
{
if (validate)
Expand Down Expand Up @@ -231,10 +283,46 @@ public bool Validate()
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.MessageVariant1?>? messageVariant1 = null,
global::System.Action<global::AssemblyAI.MessageVariant2?>? messageVariant2 = null,
global::System.Action<global::AssemblyAI.MessageVariant3?>? messageVariant3 = null,
global::System.Action<global::AssemblyAI.MessageVariant4?>? tool = null,
global::System.Action<global::AssemblyAI.MessageVariant1>? messageVariant1 = null,

global::System.Action<global::AssemblyAI.MessageVariant2>? messageVariant2 = null,

global::System.Action<global::AssemblyAI.MessageVariant3>? messageVariant3 = null,

global::System.Action<global::AssemblyAI.MessageVariant4>? 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!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::AssemblyAI.MessageVariant1>? messageVariant1 = null,
global::System.Action<global::AssemblyAI.MessageVariant2>? messageVariant2 = null,
global::System.Action<global::AssemblyAI.MessageVariant3>? messageVariant3 = null,
global::System.Action<global::AssemblyAI.MessageVariant4>? tool = null,
bool validate = true)
{
if (validate)
Expand Down
54 changes: 52 additions & 2 deletions src/libs/AssemblyAI/Generated/AssemblyAI.Models.ToolChoice.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ namespace AssemblyAI
#endif
public bool IsToolChoice0 => ToolChoice0 != null;

/// <summary>
///
/// </summary>
public bool TryPickToolChoice0(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.ToolChoice0? value)
{
value = ToolChoice0;
return IsToolChoice0;
}

/// <summary>
///
/// </summary>
Expand All @@ -42,6 +55,19 @@ namespace AssemblyAI
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolChoice1))]
#endif
public bool IsToolChoice1 => ToolChoice1 != null;

/// <summary>
///
/// </summary>
public bool TryPickToolChoice1(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::AssemblyAI.ToolChoice1? value)
{
value = ToolChoice1;
return IsToolChoice1;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -119,7 +145,7 @@ public bool Validate()
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.ToolChoice0?, TResult>? toolChoice0 = null,
global::System.Func<global::AssemblyAI.ToolChoice1?, TResult>? toolChoice1 = null,
global::System.Func<global::AssemblyAI.ToolChoice1, TResult>? toolChoice1 = null,
bool validate = true)
{
if (validate)
Expand All @@ -144,7 +170,31 @@ public bool Validate()
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.ToolChoice0?>? toolChoice0 = null,
global::System.Action<global::AssemblyAI.ToolChoice1?>? toolChoice1 = null,

global::System.Action<global::AssemblyAI.ToolChoice1>? toolChoice1 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsToolChoice0)
{
toolChoice0?.Invoke(ToolChoice0!);
}
else if (IsToolChoice1)
{
toolChoice1?.Invoke(ToolChoice1!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::AssemblyAI.ToolChoice0?>? toolChoice0 = null,
global::System.Action<global::AssemblyAI.ToolChoice1>? toolChoice1 = null,
bool validate = true)
{
if (validate)
Expand Down
Loading