ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6

This commit is contained in:
speakeasybot
2024-09-13 00:25:35 +00:00
parent f83d7949e1
commit 5585a18ab9
652 changed files with 34020 additions and 4554 deletions

View File

@@ -5,6 +5,8 @@
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.models.errors.GetWatchListBadRequest;
import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.operations.GetWatchListRequest;
import dev.plexapi.sdk.models.operations.GetWatchListRequestBuilder;
@@ -173,19 +175,11 @@ public class Watchlist implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
dev.plexapi.sdk.models.errors.GetWatchListResponseBody _out = Utils.mapper().readValue(
GetWatchListBadRequest _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<dev.plexapi.sdk.models.errors.GetWatchListResponseBody>() {});
new TypeReference<GetWatchListBadRequest>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
@@ -197,6 +191,30 @@ public class Watchlist implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetWatchListUnauthorized _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetWatchListUnauthorized>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
throw new SDKError(
_httpRes,
_httpRes.statusCode(),