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 @@ -158,7 +158,7 @@ partial void ProcessGetWalletResponseContent(
pathTemplate: "\"/account/user/wallet/\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: null,
exception: null,
clientOptions: Options,
Expand Down Expand Up @@ -192,7 +192,7 @@ partial void ProcessGetWalletResponseContent(
pathTemplate: "\"/account/user/wallet/\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: null,
exception: __exception,
clientOptions: Options,
Expand Down Expand Up @@ -233,7 +233,7 @@ partial void ProcessGetWalletResponseContent(
pathTemplate: "\"/account/user/wallet/\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand Down Expand Up @@ -281,7 +281,7 @@ partial void ProcessGetWalletResponseContent(
pathTemplate: "\"/account/user/wallet/\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand All @@ -303,7 +303,7 @@ partial void ProcessGetWalletResponseContent(
pathTemplate: "\"/account/user/wallet/\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ public static class AutoSDKConditionalRequests
{
send = send ?? throw new global::System.ArgumentNullException(nameof(send));
requestOptions = CloneRequestOptions(requestOptions);
if (!string.IsNullOrWhiteSpace(entityTag))
if (entityTag is { } nonEmptyEntityTag && !string.IsNullOrWhiteSpace(nonEmptyEntityTag))
{
requestOptions.Headers["If-None-Match"] = entityTag!;
requestOptions.Headers["If-None-Match"] = nonEmptyEntityTag;
}

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ partial void ProcessCreateTencentHunyuanProTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/pro/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: null,
exception: null,
clientOptions: Options,
Expand Down Expand Up @@ -212,7 +212,7 @@ partial void ProcessCreateTencentHunyuanProTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/pro/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: null,
exception: __exception,
clientOptions: Options,
Expand Down Expand Up @@ -253,7 +253,7 @@ partial void ProcessCreateTencentHunyuanProTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/pro/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand Down Expand Up @@ -301,7 +301,7 @@ partial void ProcessCreateTencentHunyuanProTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/pro/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand All @@ -323,7 +323,7 @@ partial void ProcessCreateTencentHunyuanProTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/pro/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ partial void ProcessCreateTencentHunyuanRapidTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/rapid/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: null,
exception: null,
clientOptions: Options,
Expand Down Expand Up @@ -212,7 +212,7 @@ partial void ProcessCreateTencentHunyuanRapidTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/rapid/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: null,
exception: __exception,
clientOptions: Options,
Expand Down Expand Up @@ -253,7 +253,7 @@ partial void ProcessCreateTencentHunyuanRapidTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/rapid/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand Down Expand Up @@ -301,7 +301,7 @@ partial void ProcessCreateTencentHunyuanRapidTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/rapid/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand All @@ -323,7 +323,7 @@ partial void ProcessCreateTencentHunyuanRapidTaskResponseContent(
pathTemplate: "\"/v1/3d-models/tencent/generate/rapid/\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
response: __response,
exception: null,
clientOptions: Options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override void Write(
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ThreeDAIStudio.TripoSharedGenerationRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::ThreeDAIStudio.TripoSharedGenerationRequest?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ThreeDAIStudio.TripoSharedGenerationRequest).Name}");
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.SharedGeneration!, typeInfo);
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickSharedGeneration(), typeInfo);
if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
Expand All @@ -88,7 +88,7 @@ public override void Write(
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ThreeDAIStudio.TripoImageTo3DRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::ThreeDAIStudio.TripoImageTo3DRequestVariant2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ThreeDAIStudio.TripoImageTo3DRequestVariant2).Name}");
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.TripoImageTo3DRequestVariant2!, typeInfo);
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickTripoImageTo3DRequestVariant2(), typeInfo);
if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override void Write(
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ThreeDAIStudio.TripoSharedGenerationRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::ThreeDAIStudio.TripoSharedGenerationRequest?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ThreeDAIStudio.TripoSharedGenerationRequest).Name}");
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.SharedGeneration!, typeInfo);
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickSharedGeneration(), typeInfo);
if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
Expand All @@ -88,7 +88,7 @@ public override void Write(
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ThreeDAIStudio.TripoMultiviewTo3DRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::ThreeDAIStudio.TripoMultiviewTo3DRequestVariant2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ThreeDAIStudio.TripoMultiviewTo3DRequestVariant2).Name}");
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.TripoMultiviewTo3DRequestVariant2!, typeInfo);
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickTripoMultiviewTo3DRequestVariant2(), typeInfo);
if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override void Write(
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ThreeDAIStudio.TripoSharedGenerationRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::ThreeDAIStudio.TripoSharedGenerationRequest?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ThreeDAIStudio.TripoSharedGenerationRequest).Name}");
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.SharedGeneration!, typeInfo);
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickSharedGeneration(), typeInfo);
if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
Expand All @@ -88,7 +88,7 @@ public override void Write(
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ThreeDAIStudio.TripoTextTo3DRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::ThreeDAIStudio.TripoTextTo3DRequestVariant2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ThreeDAIStudio.TripoTextTo3DRequestVariant2).Name}");
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.TripoTextTo3DRequestVariant2!, typeInfo);
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickTripoTextTo3DRequestVariant2(), typeInfo);
if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public bool TryPickSharedGeneration(
/// <summary>
///
/// </summary>
public global::ThreeDAIStudio.TripoSharedGenerationRequest PickSharedGeneration() => IsSharedGeneration
? SharedGeneration!
public global::ThreeDAIStudio.TripoSharedGenerationRequest PickSharedGeneration() => SharedGeneration is { } value
? value
: throw new global::System.InvalidOperationException($"Expected union variant 'SharedGeneration' but the value was {ToString()}.");

/// <summary>
Expand Down Expand Up @@ -79,8 +79,8 @@ public bool TryPickTripoImageTo3DRequestVariant2(
/// <summary>
///
/// </summary>
public global::ThreeDAIStudio.TripoImageTo3DRequestVariant2 PickTripoImageTo3DRequestVariant2() => IsTripoImageTo3DRequestVariant2
? TripoImageTo3DRequestVariant2!
public global::ThreeDAIStudio.TripoImageTo3DRequestVariant2 PickTripoImageTo3DRequestVariant2() => TripoImageTo3DRequestVariant2 is { } value
? value
: throw new global::System.InvalidOperationException($"Expected union variant 'TripoImageTo3DRequestVariant2' but the value was {ToString()}.");
/// <summary>
///
Expand Down Expand Up @@ -177,13 +177,13 @@ public bool Validate()
Validate();
}

if (IsSharedGeneration && sharedGeneration != null)
if (SharedGeneration is { } __value0 && sharedGeneration != null)
{
return sharedGeneration(SharedGeneration!);
return sharedGeneration(__value0);
}
else if (IsTripoImageTo3DRequestVariant2 && tripoImageTo3DRequestVariant2 != null)
else if (TripoImageTo3DRequestVariant2 is { } __value1 && tripoImageTo3DRequestVariant2 != null)
{
return tripoImageTo3DRequestVariant2(TripoImageTo3DRequestVariant2!);
return tripoImageTo3DRequestVariant2(__value1);
}

return default(TResult);
Expand All @@ -203,13 +203,13 @@ public void Match(
Validate();
}

if (IsSharedGeneration)
if (SharedGeneration is { } __value0)
{
sharedGeneration?.Invoke(SharedGeneration!);
sharedGeneration?.Invoke(__value0);
}
else if (IsTripoImageTo3DRequestVariant2)
else if (TripoImageTo3DRequestVariant2 is { } __value1)
{
tripoImageTo3DRequestVariant2?.Invoke(TripoImageTo3DRequestVariant2!);
tripoImageTo3DRequestVariant2?.Invoke(__value1);
}
}

Expand All @@ -226,13 +226,13 @@ public void Switch(
Validate();
}

if (IsSharedGeneration)
if (SharedGeneration is { } __value0)
{
sharedGeneration?.Invoke(SharedGeneration!);
sharedGeneration?.Invoke(__value0);
}
else if (IsTripoImageTo3DRequestVariant2)
else if (TripoImageTo3DRequestVariant2 is { } __value1)
{
tripoImageTo3DRequestVariant2?.Invoke(TripoImageTo3DRequestVariant2!);
tripoImageTo3DRequestVariant2?.Invoke(__value1);
}
}

Expand Down
Loading
Loading