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
64 changes: 32 additions & 32 deletions src/libs/AssemblyAI/Generated/AssemblyAI.AnyOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
namespace AssemblyAI
{
/// <summary>
///
///
/// </summary>
public readonly partial struct AnyOf<T1, T2> : global::System.IEquatable<AnyOf<T1, T2>>
{
/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
public T1? Value1 { get; init; }
Expand All @@ -18,15 +18,15 @@ namespace AssemblyAI
#endif

/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))]
#endif
public bool IsValue1 => Value1 != null;

/// <summary>
///
///
/// </summary>
public bool TryPickValue1(
#if NET6_0_OR_GREATER
Expand All @@ -39,14 +39,14 @@ public bool TryPickValue1(
}

/// <summary>
///
///
/// </summary>
public T1 PickValue1() => IsValue1
? Value1!
: throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}.");

/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
public T2? Value2 { get; init; }
Expand All @@ -55,15 +55,15 @@ public T1 PickValue1() => IsValue1
#endif

/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;

/// <summary>
///
///
/// </summary>
public bool TryPickValue2(
#if NET6_0_OR_GREATER
Expand All @@ -76,59 +76,59 @@ public bool TryPickValue2(
}

/// <summary>
///
///
/// </summary>
public T2 PickValue2() => IsValue2
? Value2!
: throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}.");
/// <summary>
///
///
/// </summary>
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>((T1?)value);

/// <summary>
///
///
/// </summary>
public static implicit operator T1?(AnyOf<T1, T2> @this) => @this.Value1;

/// <summary>
///
///
/// </summary>
public AnyOf(T1? value)
{
Value1 = value;
}

/// <summary>
///
///
/// </summary>
public static AnyOf<T1, T2> FromValue1(T1? value) => new AnyOf<T1, T2>(value);

/// <summary>
///
///
/// </summary>
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>((T2?)value);

/// <summary>
///
///
/// </summary>
public static implicit operator T2?(AnyOf<T1, T2> @this) => @this.Value2;

/// <summary>
///
///
/// </summary>
public AnyOf(T2? value)
{
Value2 = value;
}

/// <summary>
///
///
/// </summary>
public static AnyOf<T1, T2> FromValue2(T2? value) => new AnyOf<T1, T2>(value);

/// <summary>
///
///
/// </summary>
public AnyOf(
T1? value1,
Expand All @@ -140,31 +140,31 @@ public AnyOf(
}

/// <summary>
///
///
/// </summary>
public object? Object =>
Value2 as object ??
Value1 as object
Value1 as object
;

/// <summary>
///
///
/// </summary>
public override string? ToString() =>
Value1?.ToString() ??
Value2?.ToString()
Value2?.ToString()
;

/// <summary>
///
///
/// </summary>
public bool Validate()
{
return IsValue1 || IsValue2;
}

/// <summary>
///
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<T1, TResult>? value1 = null,
Expand All @@ -189,7 +189,7 @@ public bool Validate()
}

/// <summary>
///
///
/// </summary>
public void Match(
global::System.Action<T1>? value1 = null,
Expand All @@ -213,7 +213,7 @@ public void Match(
}

/// <summary>
///
///
/// </summary>
public void Switch(
global::System.Action<T1>? value1 = null,
Expand All @@ -236,7 +236,7 @@ public void Switch(
}

/// <summary>
///
///
/// </summary>
public override int GetHashCode()
{
Expand All @@ -257,34 +257,34 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
}

/// <summary>
///
///
/// </summary>
public bool Equals(AnyOf<T1, T2> other)
{
return
global::System.Collections.Generic.EqualityComparer<T1?>.Default.Equals(Value1, other.Value1) &&
global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2)
global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2)
;
}

/// <summary>
///
///
/// </summary>
public static bool operator ==(AnyOf<T1, T2> obj1, AnyOf<T1, T2> obj2)
{
return global::System.Collections.Generic.EqualityComparer<AnyOf<T1, T2>>.Default.Equals(obj1, obj2);
}

/// <summary>
///
///
/// </summary>
public static bool operator !=(AnyOf<T1, T2> obj1, AnyOf<T1, T2> obj2)
{
return !(obj1 == obj2);
}

/// <summary>
///
///
/// </summary>
public override bool Equals(object? obj)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public sealed partial class AssemblyAIClient : global::AssemblyAI.IAssemblyAICli
/// <inheritdoc/>
public global::AssemblyAI.AutoSDKClientOptions Options { get; }
/// <summary>
///
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::AssemblyAI.SourceGenerationContext.Default;


/// <summary>
///
///
/// </summary>
public FilesClient Files => new FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
Expand All @@ -50,7 +50,7 @@ public sealed partial class AssemblyAIClient : global::AssemblyAI.IAssemblyAICli
};

/// <summary>
///
///
/// </summary>
public TranscriptsClient Transcripts => new TranscriptsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ partial void ProcessUploadResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}

var __httpRequestContent = new global::System.Net.Http.ByteArrayContent(request);
Expand Down Expand Up @@ -487,7 +487,7 @@ partial void ProcessUploadResponseContent(
h => h.Key,
h => h.Value));
}
// Upload failed (for example, when the request body is empty). The response body is plain text, not JSON.
// Upload failed (for example, when the request body is empty). The response body is plain text, not JSON.
if ((int)__response.StatusCode == 422)
{
string? __content_422 = null;
Expand Down Expand Up @@ -598,7 +598,7 @@ partial void ProcessUploadResponseContent(
h => h.Key,
h => h.Value));
}
//
//
if ((int)__response.StatusCode == 503)
{
string? __content_503 = null;
Expand Down Expand Up @@ -630,7 +630,7 @@ partial void ProcessUploadResponseContent(
h => h.Key,
h => h.Value));
}
//
//
if ((int)__response.StatusCode == 504)
{
string? __content_504 = null;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/AssemblyAI/Generated/AssemblyAI.FilesClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed partial class FilesClient : global::AssemblyAI.IFilesClient, globa
/// <inheritdoc/>
public global::AssemblyAI.AutoSDKClientOptions Options { get; }
/// <summary>
///
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::AssemblyAI.SourceGenerationContext.Default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ public partial interface IAssemblyAIClient : global::System.IDisposable


/// <summary>
///
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }


/// <summary>
///
///
/// </summary>
public FilesClient Files { get; }

/// <summary>
///
///
/// </summary>
public TranscriptsClient Transcripts { get; }

Expand Down
2 changes: 1 addition & 1 deletion src/libs/AssemblyAI/Generated/AssemblyAI.IFilesClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public partial interface IFilesClient : global::System.IDisposable


/// <summary>
///
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public partial interface ITranscriptsClient : global::System.IDisposable


/// <summary>
///
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed class AudioIntelligenceModelStatusJsonConverter : global::System.T
{
return global::AssemblyAI.AudioIntelligenceModelStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed class AudioIntelligenceModelStatusNullableJsonConverter : global::
{
return global::AssemblyAI.AudioIntelligenceModelStatusExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed class EntityTypeJsonConverter : global::System.Text.Json.Serializa
{
return global::AssemblyAI.EntityTypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed class EntityTypeNullableJsonConverter : global::System.Text.Json.S
{
return global::AssemblyAI.EntityTypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed class PiiPolicyJsonConverter : global::System.Text.Json.Serializat
{
return global::AssemblyAI.PiiPolicyExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
Expand Down
Loading