Skip to content
Open
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 @@ -365,13 +365,13 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -382,7 +382,7 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseObject: __value_400,
Expand All @@ -402,13 +402,13 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_403 = global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
__value_403 = __content_403 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_403 = global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
__value_403 = __content_403 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -419,7 +419,7 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_403 is { Length: > 0 } ? __content_403 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_403,
responseBody: __content_403,
responseObject: __value_403,
Expand All @@ -439,13 +439,13 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_404 = global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -456,7 +456,7 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
responseBody: __content_404,
responseObject: __value_404,
Expand All @@ -476,13 +476,13 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_500 = global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
__value_500 = __content_500 is not { Length: > 0 } ? null : global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_500 = global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
__value_500 = __content_500 is not { Length: > 0 } ? null : global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -493,7 +493,7 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>?>.Create(
statusCode: __response.StatusCode,
message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_500,
responseBody: __content_500,
responseObject: __value_500,
Expand Down Expand Up @@ -536,7 +536,7 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(
{
throw global::DeepL.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -581,7 +581,7 @@ partial void ProcessAdminCreateDeveloperKeyResponseContent(

throw global::DeepL.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,13 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
__value_400 = __content_400 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -382,7 +382,7 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_400 is { Length: > 0 } ? __content_400 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseObject: __value_400,
Expand All @@ -402,13 +402,13 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_403 = global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
__value_403 = __content_403 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_403 = global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
__value_403 = __content_403 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -419,7 +419,7 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_403 is { Length: > 0 } ? __content_403 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_403,
responseBody: __content_403,
responseObject: __value_403,
Expand All @@ -439,13 +439,13 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_404 = global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_404 = global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
__value_404 = __content_404 is not { Length: > 0 } ? null : global::DeepL.ErrorResponse.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -456,7 +456,7 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_404 is { Length: > 0 } ? __content_404 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_404,
responseBody: __content_404,
responseObject: __value_404,
Expand All @@ -476,13 +476,13 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(
if (__effectiveReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_500 = global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
__value_500 = __content_500 is not { Length: > 0 } ? null : global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_500 = global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
__value_500 = __content_500 is not { Length: > 0 } ? null : global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>.FromJson(__content_500, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -493,7 +493,7 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(

throw global::DeepL.ApiException<global::DeepL.OneOf<global::DeepL.ErrorResponse, global::DeepL.InfrastructureErrorResponse>?>.Create(
statusCode: __response.StatusCode,
message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
message: __content_500 is { Length: > 0 } ? __content_500 : __response.ReasonPhrase ?? string.Empty,
innerException: __exception_500,
responseBody: __content_500,
responseObject: __value_500,
Expand Down Expand Up @@ -536,7 +536,7 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(
{
throw global::DeepL.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down Expand Up @@ -581,7 +581,7 @@ partial void ProcessAdminDeactivateDeveloperKeyResponseContent(

throw global::DeepL.ApiException.Create(
statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
message: __content is { Length: > 0 } ? __content : __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
responseBody: __content,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
Expand Down
Loading
Loading