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
80 changes: 40 additions & 40 deletions src/libs/Soniox/Generated/Soniox.AnyOf.3.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
namespace Soniox
{
/// <summary>
///
///
/// </summary>
public readonly partial struct AnyOf<T1, T2, T3> : global::System.IEquatable<AnyOf<T1, T2, T3>>
{
/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
public T1? Value1 { get; init; }
Expand All @@ -18,15 +18,15 @@ namespace Soniox
#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,14 +76,14 @@ 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>
#if NET6_0_OR_GREATER
public T3? Value3 { get; init; }
Expand All @@ -92,15 +92,15 @@ public T2 PickValue2() => IsValue2
#endif

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

/// <summary>
///
///
/// </summary>
public bool TryPickValue3(
#if NET6_0_OR_GREATER
Expand All @@ -113,82 +113,82 @@ public bool TryPickValue3(
}

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

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

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

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

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

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

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

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

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

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

/// <summary>
///
///
/// </summary>
public AnyOf(T3? value)
{
Value3 = value;
}

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

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

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

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

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

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

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

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

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

/// <summary>
///
///
/// </summary>
public bool Equals(AnyOf<T1, T2, T3> 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<T3?>.Default.Equals(Value3, other.Value3)
global::System.Collections.Generic.EqualityComparer<T3?>.Default.Equals(Value3, other.Value3)
;
}

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

/// <summary>
///
///
/// </summary>
public static bool operator !=(AnyOf<T1, T2, T3> obj1, AnyOf<T1, T2, T3> 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 @@ -141,7 +141,7 @@ partial void ProcessCreateTemporaryApiKeyResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
Expand Down Expand Up @@ -339,7 +339,7 @@ partial void ProcessCreateTemporaryApiKeyResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request. Error types: - `invalid_request`: One or more body fields are missing or invalid (`usage_type`, `expires_in_seconds` out of range, `client_reference_id` too long, `max_session_duration_seconds` out of range, etc.). Inspect `validation_errors`.
// Invalid request. Error types: - `invalid_request`: One or more body fields are missing or invalid (`usage_type`, `expires_in_seconds` out of range, `client_reference_id` too long, `max_session_duration_seconds` out of range, etc.). Inspect `validation_errors`.
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
Expand Down Expand Up @@ -413,7 +413,7 @@ partial void ProcessCreateTemporaryApiKeyResponseContent(
h => h.Key,
h => h.Value));
}
// Rate / capacity limit exceeded. Error types: - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
// Rate / capacity limit exceeded. Error types: - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Soniox/Generated/Soniox.AuthClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed partial class AuthClient : global::Soniox.IAuthClient, global::Sys
internal global::System.Lazy<global::System.Text.Json.Serialization.JsonSerializerContext> JsonSerializerContextProvider { get; set; } = new(() => global::Soniox.SourceGenerationContext.Default);

/// <summary>
///
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ partial void ProcessGetConcurrencyLimitsResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
Expand Down Expand Up @@ -391,7 +391,7 @@ partial void ProcessGetConcurrencyLimitsResponseContent(
h => h.Key,
h => h.Value));
}
// Rate or usage limit exceeded. Error types: - `limit_exceeded`: - `Requests per minute limit has been exceeded for your organization.` - `Requests per minute limit has been exceeded for your project.`
// Rate or usage limit exceeded. Error types: - `limit_exceeded`: - `Requests per minute limit has been exceeded for your organization.` - `Requests per minute limit has been exceeded for your project.`
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed partial class ConcurrencyLimitsClient : global::Soniox.IConcurrenc
internal global::System.Lazy<global::System.Text.Json.Serialization.JsonSerializerContext> JsonSerializerContextProvider { get; set; } = new(() => global::Soniox.SourceGenerationContext.Default);

/// <summary>
///
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ partial void ProcessGetConcurrentStreamsHistoryResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
global::Soniox.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
Expand Down Expand Up @@ -377,7 +377,7 @@ partial void ProcessGetConcurrentStreamsHistoryResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request. Error types: - `invalid_request`: A query parameter is missing or invalid. Common causes: `period_sec` is not one of `60`, `3600`, `86400`, `start_time` / `end_time` not parseable as ISO 8601, `end_time` not strictly after `start_time`, the window between them exceeds the maximum for the requested `period_sec`, or the window would return more than 20000 entries.
// Invalid request. Error types: - `invalid_request`: A query parameter is missing or invalid. Common causes: `period_sec` is not one of `60`, `3600`, `86400`, `start_time` / `end_time` not parseable as ISO 8601, `end_time` not strictly after `start_time`, the window between them exceeds the maximum for the requested `period_sec`, or the window would return more than 20000 entries.
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
Expand Down Expand Up @@ -451,7 +451,7 @@ partial void ProcessGetConcurrentStreamsHistoryResponseContent(
h => h.Key,
h => h.Value));
}
// Rate / capacity limit exceeded. Error types: - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
// Rate / capacity limit exceeded. Error types: - `limit_exceeded`: The caller hit a per-minute request rate or other capacity limit. The `message` describes which limit was hit.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
Expand Down
Loading