Skip to content

Commit

Permalink
Merge pull request #16 from tryAGI/bot/update-openapi_202410010124
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 1, 2024
2 parents c176e0d + 7dededb commit 11f87ba
Show file tree
Hide file tree
Showing 15 changed files with 680 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/libs/AssemblyAI/Generated/AnyOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,54 @@ public bool Validate()
return IsValue1 || IsValue2;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<T1, TResult>? value1 = null,
global::System.Func<T2, TResult>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1 && value1 != null)
{
return value1(Value1!);
}
else if (IsValue2 && value2 != null)
{
return value2(Value2!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<T1>? value1 = null,
global::System.Action<T2>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
}

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,54 @@ public bool Validate()
return IsValue1 && IsValue2;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LemurBaseParams?, TResult>? value1 = null,
global::System.Func<global::AssemblyAI.LemurActionItemsParamsVariant2?, TResult>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1 && value1 != null)
{
return value1(Value1!);
}
else if (IsValue2 && value2 != null)
{
return value2(Value2!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LemurBaseParams?>? value1 = null,
global::System.Action<global::AssemblyAI.LemurActionItemsParamsVariant2?>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
}

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,44 @@ public bool Validate()
return IsString;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LemurStringResponse?, TResult>? @string = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsString && @string != null)
{
return @string(String!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LemurStringResponse?>? @string = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsString)
{
@string?.Invoke(String!);
}
}

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,54 @@ public bool Validate()
return IsValue1 && IsValue2;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LemurBaseParams?, TResult>? value1 = null,
global::System.Func<global::AssemblyAI.LemurQuestionAnswerParamsVariant2?, TResult>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1 && value1 != null)
{
return value1(Value1!);
}
else if (IsValue2 && value2 != null)
{
return value2(Value2!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LemurBaseParams?>? value1 = null,
global::System.Action<global::AssemblyAI.LemurQuestionAnswerParamsVariant2?>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
}

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,54 @@ public bool Validate()
return IsValue1 && IsValue2;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LemurBaseResponse?, TResult>? value1 = null,
global::System.Func<global::AssemblyAI.LemurQuestionAnswerResponseVariant2?, TResult>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1 && value1 != null)
{
return value1(Value1!);
}
else if (IsValue2 && value2 != null)
{
return value2(Value2!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LemurBaseResponse?>? value1 = null,
global::System.Action<global::AssemblyAI.LemurQuestionAnswerResponseVariant2?>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
}

/// <summary>
///
/// </summary>
Expand Down
48 changes: 48 additions & 0 deletions src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurResponse.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,54 @@ public bool Validate()
return IsString && !IsQuestionAnswer || !IsString && IsQuestionAnswer;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LemurStringResponse?, TResult>? @string = null,
global::System.Func<global::AssemblyAI.LemurQuestionAnswerResponse?, TResult>? questionAnswer = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsString && @string != null)
{
return @string(String!);
}
else if (IsQuestionAnswer && questionAnswer != null)
{
return questionAnswer(QuestionAnswer!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LemurStringResponse?>? @string = null,
global::System.Action<global::AssemblyAI.LemurQuestionAnswerResponse?>? questionAnswer = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsString)
{
@string?.Invoke(String!);
}
else if (IsQuestionAnswer)
{
questionAnswer?.Invoke(QuestionAnswer!);
}
}

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,54 @@ public bool Validate()
return IsValue1 && IsValue2;
}

/// <summary>
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::AssemblyAI.LemurStringResponseVariant1?, TResult>? value1 = null,
global::System.Func<global::AssemblyAI.LemurBaseResponse?, TResult>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1 && value1 != null)
{
return value1(Value1!);
}
else if (IsValue2 && value2 != null)
{
return value2(Value2!);
}

return default(TResult);
}

/// <summary>
///
/// </summary>
public void Match(
global::System.Action<global::AssemblyAI.LemurStringResponseVariant1?>? value1 = null,
global::System.Action<global::AssemblyAI.LemurBaseResponse?>? value2 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
}

/// <summary>
///
/// </summary>
Expand Down
Loading

0 comments on commit 11f87ba

Please sign in to comment.