mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 12:37:47 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6
This commit is contained in:
@@ -5,7 +5,10 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.CancelServerActivitiesResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.CancelServerActivitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.CancelServerActivitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerActivitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerActivitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequest;
|
||||
import dev.plexapi.sdk.models.operations.CancelServerActivitiesRequestBuilder;
|
||||
@@ -147,19 +150,11 @@ public class Activities 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.GetServerActivitiesResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerActivitiesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerActivitiesResponseBody>() {});
|
||||
new TypeReference<GetServerActivitiesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -171,6 +166,30 @@ public class Activities implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerActivitiesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerActivitiesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -277,19 +296,11 @@ public class Activities implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
CancelServerActivitiesResponseBody _out = Utils.mapper().readValue(
|
||||
CancelServerActivitiesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<CancelServerActivitiesResponseBody>() {});
|
||||
new TypeReference<CancelServerActivitiesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -301,6 +312,30 @@ public class Activities implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
CancelServerActivitiesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<CancelServerActivitiesUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,22 +5,25 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetTransientTokenResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetUserDetailsResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.PostUsersSignInDataResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSourceConnectionInformationUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetTokenDetailsRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetTokenDetailsUserPlexAccount;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetUserDetailsRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetUserDetailsRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetUserDetailsResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetUserDetailsUserPlexAccount;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
|
||||
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBuilder;
|
||||
@@ -53,21 +56,21 @@ import java.util.Optional;
|
||||
public class Authentication implements
|
||||
MethodCallGetTransientToken,
|
||||
MethodCallGetSourceConnectionInformation,
|
||||
MethodCallGetUserDetails,
|
||||
MethodCallGetTokenDetails,
|
||||
MethodCallPostUsersSignInData {
|
||||
|
||||
/**
|
||||
* GET_USER_DETAILS_SERVERS contains the list of server urls available to the SDK.
|
||||
* GET_TOKEN_DETAILS_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_USER_DETAILS_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
public static final String[] GET_TOKEN_DETAILS_SERVERS = {
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
/**
|
||||
* POST_USERS_SIGN_IN_DATA_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] POST_USERS_SIGN_IN_DATA_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
@@ -78,7 +81,7 @@ public class Authentication implements
|
||||
|
||||
|
||||
/**
|
||||
* Get a Transient Token.
|
||||
* Get a Transient Token
|
||||
* This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
||||
*
|
||||
* @return The call builder
|
||||
@@ -88,7 +91,7 @@ public class Authentication implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Transient Token.
|
||||
* Get a Transient Token
|
||||
* This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
|
||||
*
|
||||
* @param type `delegation` - This is the only supported `type` parameter.
|
||||
@@ -182,19 +185,11 @@ public class Authentication implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
GetTransientTokenResponseBody _out = Utils.mapper().readValue(
|
||||
GetTransientTokenBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTransientTokenResponseBody>() {});
|
||||
new TypeReference<GetTransientTokenBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -206,6 +201,30 @@ public class Authentication implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTransientTokenUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTransientTokenUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -319,19 +338,11 @@ public class Authentication implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
GetSourceConnectionInformationResponseBody _out = Utils.mapper().readValue(
|
||||
GetSourceConnectionInformationBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetSourceConnectionInformationResponseBody>() {});
|
||||
new TypeReference<GetSourceConnectionInformationBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -343,6 +354,30 @@ public class Authentication implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetSourceConnectionInformationUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetSourceConnectionInformationUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -353,44 +388,34 @@ public class Authentication implements
|
||||
|
||||
|
||||
/**
|
||||
* Get User Data By Token
|
||||
* Get Token Details
|
||||
* Get the User data from the provided X-Plex-Token
|
||||
* @return The call builder
|
||||
*/
|
||||
public GetUserDetailsRequestBuilder getUserDetails() {
|
||||
return new GetUserDetailsRequestBuilder(this);
|
||||
public GetTokenDetailsRequestBuilder getTokenDetails() {
|
||||
return new GetTokenDetailsRequestBuilder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Data By Token
|
||||
* Get Token Details
|
||||
* Get the User data from the provided X-Plex-Token
|
||||
* @param xPlexToken Plex Authentication Token
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetUserDetailsResponse getUserDetails(
|
||||
String xPlexToken) throws Exception {
|
||||
return getUserDetails(xPlexToken, Optional.empty());
|
||||
public GetTokenDetailsResponse getTokenDetailsDirect() throws Exception {
|
||||
return getTokenDetails(Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Data By Token
|
||||
* Get Token Details
|
||||
* Get the User data from the provided X-Plex-Token
|
||||
* @param xPlexToken Plex Authentication Token
|
||||
* @param serverURL Overrides the server URL.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetUserDetailsResponse getUserDetails(
|
||||
String xPlexToken,
|
||||
public GetTokenDetailsResponse getTokenDetails(
|
||||
Optional<String> serverURL) throws Exception {
|
||||
GetUserDetailsRequest request =
|
||||
GetUserDetailsRequest
|
||||
.builder()
|
||||
.xPlexToken(xPlexToken)
|
||||
.build();
|
||||
|
||||
String _baseUrl = Utils.templateUrl(GET_USER_DETAILS_SERVERS[0], new HashMap<String, String>());
|
||||
String _baseUrl = Utils.templateUrl(GET_TOKEN_DETAILS_SERVERS[0], new HashMap<String, String>());
|
||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||
_baseUrl = serverURL.get();
|
||||
}
|
||||
@@ -403,11 +428,6 @@ public class Authentication implements
|
||||
.addHeader("user-agent",
|
||||
this.sdkConfiguration.userAgent);
|
||||
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetUserDetailsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
@@ -416,7 +436,7 @@ public class Authentication implements
|
||||
sdkConfiguration.hooks()
|
||||
.beforeRequest(
|
||||
new BeforeRequestContextImpl(
|
||||
"getUserDetails",
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_req.build());
|
||||
@@ -427,7 +447,7 @@ public class Authentication implements
|
||||
_httpRes = sdkConfiguration.hooks()
|
||||
.afterError(
|
||||
new AfterErrorContextImpl(
|
||||
"getUserDetails",
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
Optional.of(_httpRes),
|
||||
@@ -436,7 +456,7 @@ public class Authentication implements
|
||||
_httpRes = sdkConfiguration.hooks()
|
||||
.afterSuccess(
|
||||
new AfterSuccessContextImpl(
|
||||
"getUserDetails",
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_httpRes);
|
||||
@@ -445,7 +465,7 @@ public class Authentication implements
|
||||
_httpRes = sdkConfiguration.hooks()
|
||||
.afterError(
|
||||
new AfterErrorContextImpl(
|
||||
"getUserDetails",
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
Optional.empty(),
|
||||
@@ -455,20 +475,20 @@ public class Authentication implements
|
||||
.headers()
|
||||
.firstValue("Content-Type")
|
||||
.orElse("application/octet-stream");
|
||||
GetUserDetailsResponse.Builder _resBuilder =
|
||||
GetUserDetailsResponse
|
||||
GetTokenDetailsResponse.Builder _resBuilder =
|
||||
GetTokenDetailsResponse
|
||||
.builder()
|
||||
.contentType(_contentType)
|
||||
.statusCode(_httpRes.statusCode())
|
||||
.rawResponse(_httpRes);
|
||||
|
||||
GetUserDetailsResponse _res = _resBuilder.build();
|
||||
GetTokenDetailsResponse _res = _resBuilder.build();
|
||||
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetUserDetailsUserPlexAccount _out = Utils.mapper().readValue(
|
||||
GetTokenDetailsUserPlexAccount _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetUserDetailsUserPlexAccount>() {});
|
||||
new TypeReference<GetTokenDetailsUserPlexAccount>() {});
|
||||
_res.withUserPlexAccount(Optional.ofNullable(_out));
|
||||
return _res;
|
||||
} else {
|
||||
@@ -479,19 +499,11 @@ public class Authentication 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")) {
|
||||
GetUserDetailsResponseBody _out = Utils.mapper().readValue(
|
||||
GetTokenDetailsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetUserDetailsResponseBody>() {});
|
||||
new TypeReference<GetTokenDetailsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -503,6 +515,30 @@ public class Authentication implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTokenDetailsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTokenDetailsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -513,7 +549,7 @@ public class Authentication implements
|
||||
|
||||
|
||||
/**
|
||||
* Get User SignIn Data
|
||||
* Get User Sign In Data
|
||||
* Sign in user with username and password and return user data with Plex authentication token
|
||||
* @return The call builder
|
||||
*/
|
||||
@@ -522,7 +558,7 @@ public class Authentication implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User SignIn Data
|
||||
* Get User Sign In Data
|
||||
* Sign in user with username and password and return user data with Plex authentication token
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
@@ -532,7 +568,7 @@ public class Authentication implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User SignIn Data
|
||||
* Get User Sign In Data
|
||||
* Sign in user with username and password and return user data with Plex authentication token
|
||||
* @param xPlexClientIdentifier The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
@@ -650,19 +686,11 @@ public class Authentication 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")) {
|
||||
PostUsersSignInDataResponseBody _out = Utils.mapper().readValue(
|
||||
PostUsersSignInDataBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<PostUsersSignInDataResponseBody>() {});
|
||||
new TypeReference<PostUsersSignInDataBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -674,6 +702,30 @@ public class Authentication implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
PostUsersSignInDataUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<PostUsersSignInDataUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,11 +5,17 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetButlerTasksBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetButlerTasksUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StartAllTasksResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.StartTaskResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.StopAllTasksResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.StopTaskResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.StartAllTasksBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StartAllTasksUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.StartTaskBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StartTaskUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.StopAllTasksBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StopAllTasksUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.StopTaskBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StopTaskUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetButlerTasksRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetButlerTasksResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetButlerTasksResponseBody;
|
||||
@@ -156,19 +162,11 @@ public class Butler 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.GetButlerTasksResponseBody _out = Utils.mapper().readValue(
|
||||
GetButlerTasksBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetButlerTasksResponseBody>() {});
|
||||
new TypeReference<GetButlerTasksBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -180,6 +178,30 @@ public class Butler implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetButlerTasksUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetButlerTasksUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -286,19 +308,11 @@ public class Butler implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
StartAllTasksResponseBody _out = Utils.mapper().readValue(
|
||||
StartAllTasksBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StartAllTasksResponseBody>() {});
|
||||
new TypeReference<StartAllTasksBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -310,6 +324,30 @@ public class Butler implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
StartAllTasksUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StartAllTasksUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -408,19 +446,11 @@ public class Butler implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
StopAllTasksResponseBody _out = Utils.mapper().readValue(
|
||||
StopAllTasksBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StopAllTasksResponseBody>() {});
|
||||
new TypeReference<StopAllTasksBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -432,6 +462,30 @@ public class Butler implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
StopAllTasksUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StopAllTasksUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -548,19 +602,11 @@ public class Butler implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
StartTaskResponseBody _out = Utils.mapper().readValue(
|
||||
StartTaskBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StartTaskResponseBody>() {});
|
||||
new TypeReference<StartTaskBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -572,6 +618,30 @@ public class Butler implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
StartTaskUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StartTaskUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -680,19 +750,11 @@ public class Butler implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "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")) {
|
||||
StopTaskResponseBody _out = Utils.mapper().readValue(
|
||||
StopTaskBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StopTaskResponseBody>() {});
|
||||
new TypeReference<StopTaskBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -704,6 +766,30 @@ public class Butler implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
StopTaskUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StopTaskUnauthorized>() {});
|
||||
_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(), "404", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetGlobalHubsRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetGlobalHubsRequestBuilder;
|
||||
@@ -171,19 +175,11 @@ public class Hubs 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.GetGlobalHubsResponseBody _out = Utils.mapper().readValue(
|
||||
GetGlobalHubsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetGlobalHubsResponseBody>() {});
|
||||
new TypeReference<GetGlobalHubsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -195,6 +191,30 @@ public class Hubs implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetGlobalHubsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetGlobalHubsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -338,19 +358,11 @@ public class Hubs 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.GetLibraryHubsResponseBody _out = Utils.mapper().readValue(
|
||||
GetLibraryHubsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetLibraryHubsResponseBody>() {});
|
||||
new TypeReference<GetLibraryHubsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -362,6 +374,30 @@ public class Hubs implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetLibraryHubsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetLibraryHubsUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,9 +5,30 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.DeleteLibraryResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetFileHashResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetFileHashBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetMetadataChildrenBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMetadataChildrenUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetOnDeckBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetOnDeckUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetRecentlyAddedBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetRecentlyAddedUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetRefreshLibraryMetadataUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchLibraryBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchLibraryUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetTopWatchedContentBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTopWatchedContentUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.DeleteLibraryRequest;
|
||||
import dev.plexapi.sdk.models.operations.DeleteLibraryRequestBuilder;
|
||||
@@ -214,19 +235,11 @@ public class Library implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
GetFileHashResponseBody _out = Utils.mapper().readValue(
|
||||
GetFileHashBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetFileHashResponseBody>() {});
|
||||
new TypeReference<GetFileHashBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -238,6 +251,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetFileHashUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetFileHashUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -380,19 +417,11 @@ public class Library 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.GetRecentlyAddedResponseBody _out = Utils.mapper().readValue(
|
||||
GetRecentlyAddedBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetRecentlyAddedResponseBody>() {});
|
||||
new TypeReference<GetRecentlyAddedBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -404,6 +433,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetRecentlyAddedUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetRecentlyAddedUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -523,19 +576,11 @@ public class Library 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.GetAllLibrariesResponseBody _out = Utils.mapper().readValue(
|
||||
GetAllLibrariesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetAllLibrariesResponseBody>() {});
|
||||
new TypeReference<GetAllLibrariesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -547,6 +592,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetAllLibrariesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetAllLibrariesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -807,19 +876,11 @@ public class Library 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.GetLibraryDetailsResponseBody _out = Utils.mapper().readValue(
|
||||
GetLibraryDetailsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetLibraryDetailsResponseBody>() {});
|
||||
new TypeReference<GetLibraryDetailsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -831,6 +892,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetLibraryDetailsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetLibraryDetailsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -939,19 +1024,11 @@ public class Library implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
DeleteLibraryResponseBody _out = Utils.mapper().readValue(
|
||||
DeleteLibraryBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<DeleteLibraryResponseBody>() {});
|
||||
new TypeReference<DeleteLibraryBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -963,6 +1040,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
DeleteLibraryUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<DeleteLibraryUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1119,19 +1220,11 @@ public class Library 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.GetLibraryItemsResponseBody _out = Utils.mapper().readValue(
|
||||
GetLibraryItemsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetLibraryItemsResponseBody>() {});
|
||||
new TypeReference<GetLibraryItemsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1143,6 +1236,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetLibraryItemsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetLibraryItemsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1276,19 +1393,11 @@ public class Library implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
GetRefreshLibraryMetadataResponseBody _out = Utils.mapper().readValue(
|
||||
GetRefreshLibraryMetadataBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetRefreshLibraryMetadataResponseBody>() {});
|
||||
new TypeReference<GetRefreshLibraryMetadataBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1300,6 +1409,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetRefreshLibraryMetadataUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetRefreshLibraryMetadataUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1469,19 +1602,11 @@ public class Library 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.GetSearchLibraryResponseBody _out = Utils.mapper().readValue(
|
||||
GetSearchLibraryBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetSearchLibraryResponseBody>() {});
|
||||
new TypeReference<GetSearchLibraryBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1493,6 +1618,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetSearchLibraryUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetSearchLibraryUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1612,19 +1761,11 @@ public class Library 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.GetMetaDataByRatingKeyResponseBody _out = Utils.mapper().readValue(
|
||||
GetMetaDataByRatingKeyBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetMetaDataByRatingKeyResponseBody>() {});
|
||||
new TypeReference<GetMetaDataByRatingKeyBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1636,6 +1777,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetMetaDataByRatingKeyUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetMetaDataByRatingKeyUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1777,19 +1942,11 @@ public class Library 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.GetMetadataChildrenResponseBody _out = Utils.mapper().readValue(
|
||||
GetMetadataChildrenBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetMetadataChildrenResponseBody>() {});
|
||||
new TypeReference<GetMetadataChildrenBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1801,6 +1958,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetMetadataChildrenUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetMetadataChildrenUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1952,19 +2133,11 @@ public class Library 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.GetTopWatchedContentResponseBody _out = Utils.mapper().readValue(
|
||||
GetTopWatchedContentBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetTopWatchedContentResponseBody>() {});
|
||||
new TypeReference<GetTopWatchedContentBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1976,6 +2149,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTopWatchedContentUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTopWatchedContentUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -2085,19 +2282,11 @@ public class Library 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.GetOnDeckResponseBody _out = Utils.mapper().readValue(
|
||||
GetOnDeckBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetOnDeckResponseBody>() {});
|
||||
new TypeReference<GetOnDeckBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -2109,6 +2298,30 @@ public class Library implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetOnDeckUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetOnDeckUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.EnablePaperTrailResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.LogLineResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.LogMultiLineResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.EnablePaperTrailBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.EnablePaperTrailUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.LogLineBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.LogLineUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.LogMultiLineBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.LogMultiLineUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.EnablePaperTrailRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse;
|
||||
@@ -165,19 +168,11 @@ public class Log implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
LogLineResponseBody _out = Utils.mapper().readValue(
|
||||
LogLineBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<LogLineResponseBody>() {});
|
||||
new TypeReference<LogLineBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -189,6 +184,30 @@ public class Log implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
LogLineUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<LogLineUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -342,19 +361,11 @@ public class Log implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
LogMultiLineResponseBody _out = Utils.mapper().readValue(
|
||||
LogMultiLineBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<LogMultiLineResponseBody>() {});
|
||||
new TypeReference<LogMultiLineBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -366,6 +377,30 @@ public class Log implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
LogMultiLineUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<LogMultiLineUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -464,19 +499,11 @@ public class Log implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "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")) {
|
||||
EnablePaperTrailResponseBody _out = Utils.mapper().readValue(
|
||||
EnablePaperTrailBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<EnablePaperTrailResponseBody>() {});
|
||||
new TypeReference<EnablePaperTrailBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -488,6 +515,30 @@ public class Log implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
EnablePaperTrailUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<EnablePaperTrailUnauthorized>() {});
|
||||
_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(), "403", "4XX", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
|
||||
@@ -5,12 +5,17 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetBannerImageResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetThumbImageResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.MarkPlayedResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.MarkUnplayedResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetBannerImageBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetBannerImageUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetThumbImageBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetThumbImageUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.MarkPlayedBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.MarkPlayedUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.MarkUnplayedBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.MarkUnplayedUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlayProgressResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlayProgressBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlayProgressUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetBannerImageResponse;
|
||||
@@ -159,19 +164,11 @@ public class Media implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
MarkPlayedResponseBody _out = Utils.mapper().readValue(
|
||||
MarkPlayedBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<MarkPlayedResponseBody>() {});
|
||||
new TypeReference<MarkPlayedBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -183,6 +180,30 @@ public class Media implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
MarkPlayedUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<MarkPlayedUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -292,19 +313,11 @@ public class Media implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
MarkUnplayedResponseBody _out = Utils.mapper().readValue(
|
||||
MarkUnplayedBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<MarkUnplayedResponseBody>() {});
|
||||
new TypeReference<MarkUnplayedBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -316,6 +329,30 @@ public class Media implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
MarkUnplayedUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<MarkUnplayedUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -433,19 +470,11 @@ public class Media implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
UpdatePlayProgressResponseBody _out = Utils.mapper().readValue(
|
||||
UpdatePlayProgressBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<UpdatePlayProgressResponseBody>() {});
|
||||
new TypeReference<UpdatePlayProgressBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -457,6 +486,30 @@ public class Media implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
UpdatePlayProgressUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<UpdatePlayProgressUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -573,19 +626,11 @@ public class Media 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")) {
|
||||
GetBannerImageResponseBody _out = Utils.mapper().readValue(
|
||||
GetBannerImageBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetBannerImageResponseBody>() {});
|
||||
new TypeReference<GetBannerImageBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -597,6 +642,30 @@ public class Media implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetBannerImageUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetBannerImageUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -713,19 +782,11 @@ public class Media 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")) {
|
||||
GetThumbImageResponseBody _out = Utils.mapper().readValue(
|
||||
GetThumbImageBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetThumbImageResponseBody>() {});
|
||||
new TypeReference<GetThumbImageBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -737,6 +798,30 @@ public class Media implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetThumbImageUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetThumbImageUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,11 +5,25 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.DeletePlaylistResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.AddPlaylistContentsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.AddPlaylistContentsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.ClearPlaylistContentsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.DeletePlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.DeletePlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistContentsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistContentsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlaylistResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.UploadPlaylistResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.UpdatePlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.UploadPlaylistBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.UploadPlaylistUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequest;
|
||||
import dev.plexapi.sdk.models.operations.AddPlaylistContentsRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse;
|
||||
@@ -198,19 +212,11 @@ public class Playlists 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.CreatePlaylistResponseBody _out = Utils.mapper().readValue(
|
||||
CreatePlaylistBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.CreatePlaylistResponseBody>() {});
|
||||
new TypeReference<CreatePlaylistBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -222,6 +228,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
CreatePlaylistUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<CreatePlaylistUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -355,19 +385,11 @@ public class Playlists 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.GetPlaylistsResponseBody _out = Utils.mapper().readValue(
|
||||
GetPlaylistsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetPlaylistsResponseBody>() {});
|
||||
new TypeReference<GetPlaylistsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -379,6 +401,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetPlaylistsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetPlaylistsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -500,19 +546,11 @@ public class Playlists 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.GetPlaylistResponseBody _out = Utils.mapper().readValue(
|
||||
GetPlaylistBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetPlaylistResponseBody>() {});
|
||||
new TypeReference<GetPlaylistBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -524,6 +562,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetPlaylistUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetPlaylistUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -632,19 +694,11 @@ public class Playlists implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
DeletePlaylistResponseBody _out = Utils.mapper().readValue(
|
||||
DeletePlaylistBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<DeletePlaylistResponseBody>() {});
|
||||
new TypeReference<DeletePlaylistBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -656,6 +710,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
DeletePlaylistUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<DeletePlaylistUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -788,19 +866,11 @@ public class Playlists implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
UpdatePlaylistResponseBody _out = Utils.mapper().readValue(
|
||||
UpdatePlaylistBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<UpdatePlaylistResponseBody>() {});
|
||||
new TypeReference<UpdatePlaylistBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -812,6 +882,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
UpdatePlaylistUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<UpdatePlaylistUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -951,19 +1045,11 @@ public class Playlists 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.GetPlaylistContentsResponseBody _out = Utils.mapper().readValue(
|
||||
GetPlaylistContentsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetPlaylistContentsResponseBody>() {});
|
||||
new TypeReference<GetPlaylistContentsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -975,6 +1061,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetPlaylistContentsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetPlaylistContentsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1083,19 +1193,11 @@ public class Playlists implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
ClearPlaylistContentsResponseBody _out = Utils.mapper().readValue(
|
||||
ClearPlaylistContentsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<ClearPlaylistContentsResponseBody>() {});
|
||||
new TypeReference<ClearPlaylistContentsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1107,6 +1209,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
ClearPlaylistContentsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<ClearPlaylistContentsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1255,19 +1381,11 @@ public class Playlists 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.AddPlaylistContentsResponseBody _out = Utils.mapper().readValue(
|
||||
AddPlaylistContentsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.AddPlaylistContentsResponseBody>() {});
|
||||
new TypeReference<AddPlaylistContentsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1279,6 +1397,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
AddPlaylistContentsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<AddPlaylistContentsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1403,19 +1545,11 @@ public class Playlists implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
UploadPlaylistResponseBody _out = Utils.mapper().readValue(
|
||||
UploadPlaylistBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<UploadPlaylistResponseBody>() {});
|
||||
new TypeReference<UploadPlaylistBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1427,6 +1561,30 @@ public class Playlists implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
UploadPlaylistUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<UploadPlaylistUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,13 +5,19 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetGeoDataResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetPinResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenByPinIdPlexResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetCompanionsDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetGeoDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetGeoDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetHomeDataBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetHomeDataUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetPinBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenByPinIdBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTokenByPinIdResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetUserFriendsResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetUserFriendsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetUserFriendsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.Friend;
|
||||
import dev.plexapi.sdk.models.operations.GetCompanionsDataRequestBuilder;
|
||||
@@ -35,6 +41,9 @@ import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse;
|
||||
import dev.plexapi.sdk.models.operations.GetUserFriendsRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetUserFriendsResponse;
|
||||
import dev.plexapi.sdk.models.operations.IncludeHttps;
|
||||
import dev.plexapi.sdk.models.operations.IncludeIPv6;
|
||||
import dev.plexapi.sdk.models.operations.IncludeRelay;
|
||||
import dev.plexapi.sdk.models.operations.PlexDevice;
|
||||
import dev.plexapi.sdk.models.operations.ResponseBody;
|
||||
import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
|
||||
@@ -71,42 +80,42 @@ public class Plex implements
|
||||
* GET_COMPANIONS_DATA_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_COMPANIONS_DATA_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
/**
|
||||
* GET_USER_FRIENDS_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_USER_FRIENDS_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
/**
|
||||
* GET_GEO_DATA_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_GEO_DATA_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
/**
|
||||
* GET_SERVER_RESOURCES_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_SERVER_RESOURCES_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
/**
|
||||
* GET_PIN_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_PIN_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
/**
|
||||
* GET_TOKEN_BY_PIN_ID_SERVERS contains the list of server urls available to the SDK.
|
||||
*/
|
||||
public static final String[] GET_TOKEN_BY_PIN_ID_SERVERS = {
|
||||
"https://plex.tv/api/v2",
|
||||
"https://plex.tv/api/v2/",
|
||||
};
|
||||
|
||||
private final SDKConfiguration sdkConfiguration;
|
||||
@@ -228,19 +237,11 @@ public class Plex 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")) {
|
||||
GetCompanionsDataResponseBody _out = Utils.mapper().readValue(
|
||||
GetCompanionsDataBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetCompanionsDataResponseBody>() {});
|
||||
new TypeReference<GetCompanionsDataBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -252,6 +253,30 @@ public class Plex implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetCompanionsDataUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetCompanionsDataUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -373,19 +398,11 @@ public class Plex 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")) {
|
||||
GetUserFriendsResponseBody _out = Utils.mapper().readValue(
|
||||
GetUserFriendsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetUserFriendsResponseBody>() {});
|
||||
new TypeReference<GetUserFriendsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -397,6 +414,30 @@ public class Plex implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetUserFriendsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetUserFriendsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -515,19 +556,11 @@ public class Plex 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")) {
|
||||
GetGeoDataResponseBody _out = Utils.mapper().readValue(
|
||||
GetGeoDataBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetGeoDataResponseBody>() {});
|
||||
new TypeReference<GetGeoDataBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -539,6 +572,30 @@ public class Plex implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetGeoDataUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetGeoDataUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -646,19 +703,11 @@ public class Plex 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.GetHomeDataResponseBody _out = Utils.mapper().readValue(
|
||||
GetHomeDataBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetHomeDataResponseBody>() {});
|
||||
new TypeReference<GetHomeDataBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -670,6 +719,30 @@ public class Plex implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetHomeDataUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetHomeDataUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -691,26 +764,44 @@ public class Plex implements
|
||||
/**
|
||||
* Get Server Resources
|
||||
* Get Plex server access tokens and server connections
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetServerResourcesResponse getServerResources(
|
||||
GetServerResourcesRequest request) throws Exception {
|
||||
return getServerResources(request, Optional.empty());
|
||||
public GetServerResourcesResponse getServerResourcesDirect() throws Exception {
|
||||
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Server Resources
|
||||
* Get Plex server access tokens and server connections
|
||||
* @param request The request object containing all of the parameters for the API call.
|
||||
* @param xPlexClientIdentifier The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
||||
* @param includeHttps Include Https entries in the results
|
||||
* @param includeRelay Include Relay addresses in the results
|
||||
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
|
||||
|
||||
* @param includeIPv6 Include IPv6 entries in the results
|
||||
* @param serverURL Overrides the server URL.
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetServerResourcesResponse getServerResources(
|
||||
GetServerResourcesRequest request,
|
||||
Optional<String> xPlexClientIdentifier,
|
||||
Optional<? extends IncludeHttps> includeHttps,
|
||||
Optional<? extends IncludeRelay> includeRelay,
|
||||
Optional<? extends IncludeIPv6> includeIPv6,
|
||||
Optional<String> serverURL) throws Exception {
|
||||
GetServerResourcesRequest request =
|
||||
GetServerResourcesRequest
|
||||
.builder()
|
||||
.xPlexClientIdentifier(xPlexClientIdentifier)
|
||||
.includeHttps(includeHttps)
|
||||
.includeRelay(includeRelay)
|
||||
.includeIPv6(includeIPv6)
|
||||
.build();
|
||||
|
||||
String _baseUrl = Utils.templateUrl(GET_SERVER_RESOURCES_SERVERS[0], new HashMap<String, String>());
|
||||
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
|
||||
_baseUrl = serverURL.get();
|
||||
@@ -800,19 +891,11 @@ public class Plex 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")) {
|
||||
GetServerResourcesResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerResourcesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerResourcesResponseBody>() {});
|
||||
new TypeReference<GetServerResourcesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -824,6 +907,30 @@ public class Plex implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerResourcesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerResourcesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -969,9 +1076,9 @@ public class Plex implements
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetPinResponseBody _out = Utils.mapper().readValue(
|
||||
GetPinBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetPinResponseBody>() {});
|
||||
new TypeReference<GetPinBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1134,9 +1241,9 @@ public class Plex implements
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTokenByPinIdResponseBody _out = Utils.mapper().readValue(
|
||||
GetTokenByPinIdBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTokenByPinIdResponseBody>() {});
|
||||
new TypeReference<GetTokenByPinIdBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1150,9 +1257,9 @@ public class Plex implements
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTokenByPinIdPlexResponseBody _out = Utils.mapper().readValue(
|
||||
GetTokenByPinIdResponseBody _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTokenByPinIdPlexResponseBody>() {});
|
||||
new TypeReference<GetTokenByPinIdResponseBody>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
|
||||
@@ -363,6 +363,9 @@ public class PlexAPI {
|
||||
this.sdkConfiguration.retryConfig = Optional.of(retryConfig);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* ServerProtocol - The protocol to use for the server connection
|
||||
*/
|
||||
public enum ServerProtocol {
|
||||
HTTP("http"),
|
||||
HTTPS("https");
|
||||
|
||||
@@ -36,9 +36,9 @@ class SDKConfiguration {
|
||||
} };
|
||||
public String language = "java";
|
||||
public String openapiDocVersion = "0.0.3";
|
||||
public String sdkVersion = "0.2.2";
|
||||
public String genVersion = "2.411.9";
|
||||
public String userAgent = "speakeasy-sdk/java 0.2.2 2.411.9 0.0.3 dev.plexapi.sdk";
|
||||
public String sdkVersion = "0.3.0";
|
||||
public String genVersion = "2.415.6";
|
||||
public String userAgent = "speakeasy-sdk/java 0.3.0 2.415.6 0.0.3 dev.plexapi.sdk";
|
||||
|
||||
private Hooks _hooks = createHooks();
|
||||
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.PerformSearchResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.PerformVoiceSearchResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchResultsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSearchResultsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.PerformSearchBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.PerformSearchUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.PerformVoiceSearchBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.PerformVoiceSearchUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetSearchResultsRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetSearchResultsRequestBuilder;
|
||||
@@ -204,19 +208,11 @@ public class Search implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
PerformSearchResponseBody _out = Utils.mapper().readValue(
|
||||
PerformSearchBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<PerformSearchResponseBody>() {});
|
||||
new TypeReference<PerformSearchBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -228,6 +224,30 @@ public class Search implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
PerformSearchUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<PerformSearchUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -367,19 +387,11 @@ public class Search implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
PerformVoiceSearchResponseBody _out = Utils.mapper().readValue(
|
||||
PerformVoiceSearchBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<PerformVoiceSearchResponseBody>() {});
|
||||
new TypeReference<PerformVoiceSearchBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -391,6 +403,30 @@ public class Search implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
PerformVoiceSearchUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<PerformVoiceSearchUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -511,19 +547,11 @@ public class Search 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.GetSearchResultsResponseBody _out = Utils.mapper().readValue(
|
||||
GetSearchResultsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetSearchResultsResponseBody>() {});
|
||||
new TypeReference<GetSearchResultsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -535,6 +563,30 @@ public class Search implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetSearchResultsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetSearchResultsUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,7 +5,23 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetDevicesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout;
|
||||
import dev.plexapi.sdk.models.errors.GetServerListBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerListUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetAvailableClientsRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse;
|
||||
@@ -170,19 +186,11 @@ public class Server 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.GetServerCapabilitiesResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerCapabilitiesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerCapabilitiesResponseBody>() {});
|
||||
new TypeReference<GetServerCapabilitiesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -194,6 +202,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerCapabilitiesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerCapabilitiesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -301,19 +333,11 @@ public class Server 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.GetServerPreferencesResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerPreferencesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerPreferencesResponseBody>() {});
|
||||
new TypeReference<GetServerPreferencesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -325,6 +349,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerPreferencesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerPreferencesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -432,19 +480,11 @@ public class Server 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.GetAvailableClientsResponseBody _out = Utils.mapper().readValue(
|
||||
GetAvailableClientsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetAvailableClientsResponseBody>() {});
|
||||
new TypeReference<GetAvailableClientsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -456,6 +496,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetAvailableClientsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetAvailableClientsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -563,19 +627,11 @@ public class Server 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.GetDevicesResponseBody _out = Utils.mapper().readValue(
|
||||
GetDevicesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetDevicesResponseBody>() {});
|
||||
new TypeReference<GetDevicesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -587,6 +643,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetDevicesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetDevicesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -693,9 +773,9 @@ public class Server implements
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "408")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
dev.plexapi.sdk.models.errors.GetServerIdentityResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerIdentityRequestTimeout _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerIdentityResponseBody>() {});
|
||||
new TypeReference<GetServerIdentityRequestTimeout>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -822,19 +902,11 @@ public class Server 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.GetMyPlexAccountResponseBody _out = Utils.mapper().readValue(
|
||||
GetMyPlexAccountBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetMyPlexAccountResponseBody>() {});
|
||||
new TypeReference<GetMyPlexAccountBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -846,6 +918,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetMyPlexAccountUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetMyPlexAccountUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -951,19 +1047,11 @@ public class Server implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
GetResizedPhotoResponseBody _out = Utils.mapper().readValue(
|
||||
GetResizedPhotoBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetResizedPhotoResponseBody>() {});
|
||||
new TypeReference<GetResizedPhotoBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -975,6 +1063,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetResizedPhotoUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetResizedPhotoUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1095,19 +1207,11 @@ public class Server 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.GetMediaProvidersResponseBody _out = Utils.mapper().readValue(
|
||||
GetMediaProvidersBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetMediaProvidersResponseBody>() {});
|
||||
new TypeReference<GetMediaProvidersBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1119,6 +1223,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetMediaProvidersUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetMediaProvidersUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -1226,19 +1354,11 @@ public class Server 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.GetServerListResponseBody _out = Utils.mapper().readValue(
|
||||
GetServerListBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetServerListResponseBody>() {});
|
||||
new TypeReference<GetServerListBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -1250,6 +1370,30 @@ public class Server implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetServerListUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetServerListUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,8 +5,15 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionHistoryBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionHistoryUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetSessionsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetTranscodeSessionsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTranscodeSessionsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StopTranscodeSessionResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.StopTranscodeSessionBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StopTranscodeSessionUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionHistoryRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionHistoryRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse;
|
||||
@@ -152,19 +159,11 @@ public class Sessions 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.GetSessionsResponseBody _out = Utils.mapper().readValue(
|
||||
GetSessionsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetSessionsResponseBody>() {});
|
||||
new TypeReference<GetSessionsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -176,6 +175,30 @@ public class Sessions implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetSessionsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetSessionsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -320,19 +343,11 @@ public class Sessions 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.GetSessionHistoryResponseBody _out = Utils.mapper().readValue(
|
||||
GetSessionHistoryBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetSessionHistoryResponseBody>() {});
|
||||
new TypeReference<GetSessionHistoryBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -344,6 +359,30 @@ public class Sessions implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetSessionHistoryUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetSessionHistoryUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -451,19 +490,11 @@ public class Sessions 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.GetTranscodeSessionsResponseBody _out = Utils.mapper().readValue(
|
||||
GetTranscodeSessionsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetTranscodeSessionsResponseBody>() {});
|
||||
new TypeReference<GetTranscodeSessionsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -475,6 +506,30 @@ public class Sessions implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTranscodeSessionsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTranscodeSessionsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -581,19 +636,11 @@ public class Sessions implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
StopTranscodeSessionResponseBody _out = Utils.mapper().readValue(
|
||||
StopTranscodeSessionBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StopTranscodeSessionResponseBody>() {});
|
||||
new TypeReference<StopTranscodeSessionBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -605,6 +652,30 @@ public class Sessions implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
StopTranscodeSessionUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StopTranscodeSessionUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetBandwidthStatisticsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetResourcesStatisticsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetResourcesStatisticsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetStatisticsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetStatisticsUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsRequestBuilder;
|
||||
@@ -173,19 +179,11 @@ public class Statistics 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.GetStatisticsResponseBody _out = Utils.mapper().readValue(
|
||||
GetStatisticsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetStatisticsResponseBody>() {});
|
||||
new TypeReference<GetStatisticsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -197,6 +195,30 @@ public class Statistics implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetStatisticsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetStatisticsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -329,19 +351,11 @@ public class Statistics 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.GetResourcesStatisticsResponseBody _out = Utils.mapper().readValue(
|
||||
GetResourcesStatisticsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetResourcesStatisticsResponseBody>() {});
|
||||
new TypeReference<GetResourcesStatisticsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -353,6 +367,30 @@ public class Statistics implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetResourcesStatisticsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetResourcesStatisticsUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -485,19 +523,11 @@ public class Statistics 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.GetBandwidthStatisticsResponseBody _out = Utils.mapper().readValue(
|
||||
GetBandwidthStatisticsBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetBandwidthStatisticsResponseBody>() {});
|
||||
new TypeReference<GetBandwidthStatisticsBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -509,6 +539,30 @@ public class Statistics implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetBandwidthStatisticsUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetBandwidthStatisticsUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.ApplyUpdatesResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.CheckForUpdatesResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.CheckForUpdatesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.CheckForUpdatesUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.GetUpdateStatusBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetUpdateStatusUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.operations.ApplyUpdatesRequest;
|
||||
import dev.plexapi.sdk.models.operations.ApplyUpdatesRequestBuilder;
|
||||
@@ -150,19 +154,11 @@ public class Updater 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.GetUpdateStatusResponseBody _out = Utils.mapper().readValue(
|
||||
GetUpdateStatusBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<dev.plexapi.sdk.models.errors.GetUpdateStatusResponseBody>() {});
|
||||
new TypeReference<GetUpdateStatusBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -174,6 +170,30 @@ public class Updater implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetUpdateStatusUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetUpdateStatusUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -293,19 +313,11 @@ public class Updater implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
CheckForUpdatesResponseBody _out = Utils.mapper().readValue(
|
||||
CheckForUpdatesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<CheckForUpdatesResponseBody>() {});
|
||||
new TypeReference<CheckForUpdatesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -317,6 +329,30 @@ public class Updater implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
CheckForUpdatesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<CheckForUpdatesUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -442,19 +478,11 @@ public class Updater implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "500", "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")) {
|
||||
ApplyUpdatesResponseBody _out = Utils.mapper().readValue(
|
||||
ApplyUpdatesBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<ApplyUpdatesResponseBody>() {});
|
||||
new TypeReference<ApplyUpdatesBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -466,6 +494,30 @@ public class Updater implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
ApplyUpdatesUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<ApplyUpdatesUnauthorized>() {});
|
||||
_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", "500", "5XX")) {
|
||||
// no content
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
"API error occurred",
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
throw new SDKError(
|
||||
_httpRes,
|
||||
_httpRes.statusCode(),
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import dev.plexapi.sdk.models.errors.GetTimelineResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.GetTimelineBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized;
|
||||
import dev.plexapi.sdk.models.errors.SDKError;
|
||||
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeResponseBody;
|
||||
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.StartUniversalTranscodeUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetTimelineRequest;
|
||||
import dev.plexapi.sdk.models.operations.GetTimelineRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
|
||||
@@ -138,19 +140,11 @@ public class Video implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
GetTimelineResponseBody _out = Utils.mapper().readValue(
|
||||
GetTimelineBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTimelineResponseBody>() {});
|
||||
new TypeReference<GetTimelineBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -162,6 +156,30 @@ public class Video implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
GetTimelineUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<GetTimelineUnauthorized>() {});
|
||||
_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(),
|
||||
@@ -265,19 +283,11 @@ public class Video implements
|
||||
// no content
|
||||
return _res;
|
||||
}
|
||||
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")) {
|
||||
StartUniversalTranscodeResponseBody _out = Utils.mapper().readValue(
|
||||
StartUniversalTranscodeBadRequest _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StartUniversalTranscodeResponseBody>() {});
|
||||
new TypeReference<StartUniversalTranscodeBadRequest>() {});
|
||||
_out.withRawResponse(Optional.ofNullable(_httpRes));
|
||||
|
||||
throw _out;
|
||||
@@ -289,6 +299,30 @@ public class Video implements
|
||||
Utils.extractByteArrayFromBody(_httpRes));
|
||||
}
|
||||
}
|
||||
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
|
||||
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||
StartUniversalTranscodeUnauthorized _out = Utils.mapper().readValue(
|
||||
Utils.toUtf8AndClose(_httpRes.body()),
|
||||
new TypeReference<StartUniversalTranscodeUnauthorized>() {});
|
||||
_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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* AddPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* AddPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
public class AddPlaylistContentsBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public AddPlaylistContentsResponseBody(
|
||||
public AddPlaylistContentsBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<AddPlaylistContentsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody() {
|
||||
public AddPlaylistContentsBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody withErrors(List<AddPlaylistContentsErrors> errors) {
|
||||
public AddPlaylistContentsBadRequest withErrors(List<AddPlaylistContentsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody withErrors(Optional<? extends List<AddPlaylistContentsErrors>> errors) {
|
||||
public AddPlaylistContentsBadRequest withErrors(Optional<? extends List<AddPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public AddPlaylistContentsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public AddPlaylistContentsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public AddPlaylistContentsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public AddPlaylistContentsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsResponseBody other = (AddPlaylistContentsResponseBody) o;
|
||||
AddPlaylistContentsBadRequest other = (AddPlaylistContentsBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsResponseBody.class,
|
||||
return Utils.toString(AddPlaylistContentsBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsResponseBody build() {
|
||||
return new AddPlaylistContentsResponseBody(
|
||||
public AddPlaylistContentsBadRequest build() {
|
||||
return new AddPlaylistContentsBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class AddPlaylistContentsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class AddPlaylistContentsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public AddPlaylistContentsErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class AddPlaylistContentsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AddPlaylistContentsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class AddPlaylistContentsErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withCode(double code) {
|
||||
public AddPlaylistContentsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withCode(Optional<Double> code) {
|
||||
public AddPlaylistContentsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class AddPlaylistContentsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withStatus(double status) {
|
||||
public AddPlaylistContentsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsErrors withStatus(Optional<Double> status) {
|
||||
public AddPlaylistContentsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class AddPlaylistContentsErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class AddPlaylistContentsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class AddPlaylistContentsPlaylistsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public AddPlaylistContentsPlaylistsErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsPlaylistsErrors other = (AddPlaylistContentsPlaylistsErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsPlaylistsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsPlaylistsErrors build() {
|
||||
return new AddPlaylistContentsPlaylistsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* AddPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class AddPlaylistContentsUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public AddPlaylistContentsUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<AddPlaylistContentsPlaylistsErrors>> errors(){
|
||||
return (Optional<List<AddPlaylistContentsPlaylistsErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public AddPlaylistContentsUnauthorized withErrors(List<AddPlaylistContentsPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsUnauthorized withErrors(Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public AddPlaylistContentsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public AddPlaylistContentsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AddPlaylistContentsUnauthorized other = (AddPlaylistContentsUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(AddPlaylistContentsUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<AddPlaylistContentsPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AddPlaylistContentsUnauthorized build() {
|
||||
return new AddPlaylistContentsUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* ApplyUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* ApplyUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
public class ApplyUpdatesBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public ApplyUpdatesResponseBody(
|
||||
public ApplyUpdatesBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<ApplyUpdatesErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody() {
|
||||
public ApplyUpdatesBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody withErrors(List<ApplyUpdatesErrors> errors) {
|
||||
public ApplyUpdatesBadRequest withErrors(List<ApplyUpdatesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody withErrors(Optional<? extends List<ApplyUpdatesErrors>> errors) {
|
||||
public ApplyUpdatesBadRequest withErrors(Optional<? extends List<ApplyUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ApplyUpdatesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public ApplyUpdatesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ApplyUpdatesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public ApplyUpdatesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesResponseBody other = (ApplyUpdatesResponseBody) o;
|
||||
ApplyUpdatesBadRequest other = (ApplyUpdatesBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesResponseBody.class,
|
||||
return Utils.toString(ApplyUpdatesBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesResponseBody build() {
|
||||
return new ApplyUpdatesResponseBody(
|
||||
public ApplyUpdatesBadRequest build() {
|
||||
return new ApplyUpdatesBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class ApplyUpdatesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class ApplyUpdatesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public ApplyUpdatesErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class ApplyUpdatesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ApplyUpdatesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class ApplyUpdatesErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withCode(double code) {
|
||||
public ApplyUpdatesErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withCode(Optional<Double> code) {
|
||||
public ApplyUpdatesErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class ApplyUpdatesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withStatus(double status) {
|
||||
public ApplyUpdatesErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesErrors withStatus(Optional<Double> status) {
|
||||
public ApplyUpdatesErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class ApplyUpdatesErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class ApplyUpdatesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* ApplyUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class ApplyUpdatesUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public ApplyUpdatesUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<ApplyUpdatesUpdaterErrors>> errors(){
|
||||
return (Optional<List<ApplyUpdatesUpdaterErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ApplyUpdatesUnauthorized withErrors(List<ApplyUpdatesUpdaterErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUnauthorized withErrors(Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ApplyUpdatesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ApplyUpdatesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesUnauthorized other = (ApplyUpdatesUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<ApplyUpdatesUpdaterErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUnauthorized build() {
|
||||
return new ApplyUpdatesUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class ApplyUpdatesUpdaterErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public ApplyUpdatesUpdaterErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApplyUpdatesUpdaterErrors other = (ApplyUpdatesUpdaterErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ApplyUpdatesUpdaterErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApplyUpdatesUpdaterErrors build() {
|
||||
return new ApplyUpdatesUpdaterErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class CancelServerActivitiesActivitiesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public CancelServerActivitiesActivitiesErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesActivitiesErrors other = (CancelServerActivitiesActivitiesErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesActivitiesErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesActivitiesErrors build() {
|
||||
return new CancelServerActivitiesActivitiesErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* CancelServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* CancelServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
public class CancelServerActivitiesBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public CancelServerActivitiesResponseBody(
|
||||
public CancelServerActivitiesBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<CancelServerActivitiesErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody() {
|
||||
public CancelServerActivitiesBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody withErrors(List<CancelServerActivitiesErrors> errors) {
|
||||
public CancelServerActivitiesBadRequest withErrors(List<CancelServerActivitiesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody withErrors(Optional<? extends List<CancelServerActivitiesErrors>> errors) {
|
||||
public CancelServerActivitiesBadRequest withErrors(Optional<? extends List<CancelServerActivitiesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CancelServerActivitiesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public CancelServerActivitiesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CancelServerActivitiesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public CancelServerActivitiesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesResponseBody other = (CancelServerActivitiesResponseBody) o;
|
||||
CancelServerActivitiesBadRequest other = (CancelServerActivitiesBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesResponseBody.class,
|
||||
return Utils.toString(CancelServerActivitiesBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesResponseBody build() {
|
||||
return new CancelServerActivitiesResponseBody(
|
||||
public CancelServerActivitiesBadRequest build() {
|
||||
return new CancelServerActivitiesBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class CancelServerActivitiesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class CancelServerActivitiesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public CancelServerActivitiesErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class CancelServerActivitiesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CancelServerActivitiesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class CancelServerActivitiesErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withCode(double code) {
|
||||
public CancelServerActivitiesErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withCode(Optional<Double> code) {
|
||||
public CancelServerActivitiesErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class CancelServerActivitiesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withStatus(double status) {
|
||||
public CancelServerActivitiesErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesErrors withStatus(Optional<Double> status) {
|
||||
public CancelServerActivitiesErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class CancelServerActivitiesErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class CancelServerActivitiesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* CancelServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class CancelServerActivitiesUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public CancelServerActivitiesUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<CancelServerActivitiesActivitiesErrors>> errors(){
|
||||
return (Optional<List<CancelServerActivitiesActivitiesErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CancelServerActivitiesUnauthorized withErrors(List<CancelServerActivitiesActivitiesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesUnauthorized withErrors(Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CancelServerActivitiesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CancelServerActivitiesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CancelServerActivitiesUnauthorized other = (CancelServerActivitiesUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CancelServerActivitiesUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<CancelServerActivitiesActivitiesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CancelServerActivitiesUnauthorized build() {
|
||||
return new CancelServerActivitiesUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* CheckForUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* CheckForUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
public class CheckForUpdatesBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public CheckForUpdatesResponseBody(
|
||||
public CheckForUpdatesBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<CheckForUpdatesErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody() {
|
||||
public CheckForUpdatesBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody withErrors(List<CheckForUpdatesErrors> errors) {
|
||||
public CheckForUpdatesBadRequest withErrors(List<CheckForUpdatesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody withErrors(Optional<? extends List<CheckForUpdatesErrors>> errors) {
|
||||
public CheckForUpdatesBadRequest withErrors(Optional<? extends List<CheckForUpdatesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CheckForUpdatesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public CheckForUpdatesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CheckForUpdatesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public CheckForUpdatesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesResponseBody other = (CheckForUpdatesResponseBody) o;
|
||||
CheckForUpdatesBadRequest other = (CheckForUpdatesBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesResponseBody.class,
|
||||
return Utils.toString(CheckForUpdatesBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesResponseBody build() {
|
||||
return new CheckForUpdatesResponseBody(
|
||||
public CheckForUpdatesBadRequest build() {
|
||||
return new CheckForUpdatesBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class CheckForUpdatesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class CheckForUpdatesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public CheckForUpdatesErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class CheckForUpdatesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CheckForUpdatesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class CheckForUpdatesErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withCode(double code) {
|
||||
public CheckForUpdatesErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withCode(Optional<Double> code) {
|
||||
public CheckForUpdatesErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class CheckForUpdatesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withStatus(double status) {
|
||||
public CheckForUpdatesErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesErrors withStatus(Optional<Double> status) {
|
||||
public CheckForUpdatesErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class CheckForUpdatesErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class CheckForUpdatesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* CheckForUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class CheckForUpdatesUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public CheckForUpdatesUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<CheckForUpdatesUpdaterErrors>> errors(){
|
||||
return (Optional<List<CheckForUpdatesUpdaterErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CheckForUpdatesUnauthorized withErrors(List<CheckForUpdatesUpdaterErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUnauthorized withErrors(Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CheckForUpdatesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CheckForUpdatesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesUnauthorized other = (CheckForUpdatesUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<CheckForUpdatesUpdaterErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUnauthorized build() {
|
||||
return new CheckForUpdatesUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class CheckForUpdatesUpdaterErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public CheckForUpdatesUpdaterErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CheckForUpdatesUpdaterErrors other = (CheckForUpdatesUpdaterErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CheckForUpdatesUpdaterErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckForUpdatesUpdaterErrors build() {
|
||||
return new CheckForUpdatesUpdaterErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* ClearPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* ClearPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
public class ClearPlaylistContentsBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public ClearPlaylistContentsResponseBody(
|
||||
public ClearPlaylistContentsBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<ClearPlaylistContentsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody() {
|
||||
public ClearPlaylistContentsBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody withErrors(List<ClearPlaylistContentsErrors> errors) {
|
||||
public ClearPlaylistContentsBadRequest withErrors(List<ClearPlaylistContentsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody withErrors(Optional<? extends List<ClearPlaylistContentsErrors>> errors) {
|
||||
public ClearPlaylistContentsBadRequest withErrors(Optional<? extends List<ClearPlaylistContentsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ClearPlaylistContentsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public ClearPlaylistContentsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ClearPlaylistContentsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public ClearPlaylistContentsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsResponseBody other = (ClearPlaylistContentsResponseBody) o;
|
||||
ClearPlaylistContentsBadRequest other = (ClearPlaylistContentsBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsResponseBody.class,
|
||||
return Utils.toString(ClearPlaylistContentsBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsResponseBody build() {
|
||||
return new ClearPlaylistContentsResponseBody(
|
||||
public ClearPlaylistContentsBadRequest build() {
|
||||
return new ClearPlaylistContentsBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class ClearPlaylistContentsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class ClearPlaylistContentsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public ClearPlaylistContentsErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class ClearPlaylistContentsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ClearPlaylistContentsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class ClearPlaylistContentsErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withCode(double code) {
|
||||
public ClearPlaylistContentsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withCode(Optional<Double> code) {
|
||||
public ClearPlaylistContentsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class ClearPlaylistContentsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withStatus(double status) {
|
||||
public ClearPlaylistContentsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsErrors withStatus(Optional<Double> status) {
|
||||
public ClearPlaylistContentsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class ClearPlaylistContentsErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class ClearPlaylistContentsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class ClearPlaylistContentsPlaylistsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public ClearPlaylistContentsPlaylistsErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsPlaylistsErrors other = (ClearPlaylistContentsPlaylistsErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsPlaylistsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsPlaylistsErrors build() {
|
||||
return new ClearPlaylistContentsPlaylistsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* ClearPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class ClearPlaylistContentsUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public ClearPlaylistContentsUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<ClearPlaylistContentsPlaylistsErrors>> errors(){
|
||||
return (Optional<List<ClearPlaylistContentsPlaylistsErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsUnauthorized withErrors(List<ClearPlaylistContentsPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsUnauthorized withErrors(Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ClearPlaylistContentsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public ClearPlaylistContentsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClearPlaylistContentsUnauthorized other = (ClearPlaylistContentsUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(ClearPlaylistContentsUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<ClearPlaylistContentsPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClearPlaylistContentsUnauthorized build() {
|
||||
return new ClearPlaylistContentsUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* CreatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* CreatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
public class CreatePlaylistBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public CreatePlaylistResponseBody(
|
||||
public CreatePlaylistBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<CreatePlaylistErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody() {
|
||||
public CreatePlaylistBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody withErrors(List<CreatePlaylistErrors> errors) {
|
||||
public CreatePlaylistBadRequest withErrors(List<CreatePlaylistErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody withErrors(Optional<? extends List<CreatePlaylistErrors>> errors) {
|
||||
public CreatePlaylistBadRequest withErrors(Optional<? extends List<CreatePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CreatePlaylistResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public CreatePlaylistBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CreatePlaylistResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public CreatePlaylistBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistResponseBody other = (CreatePlaylistResponseBody) o;
|
||||
CreatePlaylistBadRequest other = (CreatePlaylistBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistResponseBody.class,
|
||||
return Utils.toString(CreatePlaylistBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class CreatePlaylistResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistResponseBody build() {
|
||||
return new CreatePlaylistResponseBody(
|
||||
public CreatePlaylistBadRequest build() {
|
||||
return new CreatePlaylistBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class CreatePlaylistErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class CreatePlaylistErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public CreatePlaylistErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class CreatePlaylistErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CreatePlaylistErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class CreatePlaylistErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withCode(double code) {
|
||||
public CreatePlaylistErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withCode(Optional<Double> code) {
|
||||
public CreatePlaylistErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class CreatePlaylistErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withStatus(double status) {
|
||||
public CreatePlaylistErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistErrors withStatus(Optional<Double> status) {
|
||||
public CreatePlaylistErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class CreatePlaylistErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class CreatePlaylistErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class CreatePlaylistPlaylistsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public CreatePlaylistPlaylistsErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistPlaylistsErrors other = (CreatePlaylistPlaylistsErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistPlaylistsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistPlaylistsErrors build() {
|
||||
return new CreatePlaylistPlaylistsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* CreatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class CreatePlaylistUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public CreatePlaylistUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public CreatePlaylistUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<CreatePlaylistPlaylistsErrors>> errors(){
|
||||
return (Optional<List<CreatePlaylistPlaylistsErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public CreatePlaylistUnauthorized withErrors(List<CreatePlaylistPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistUnauthorized withErrors(Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CreatePlaylistUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public CreatePlaylistUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CreatePlaylistUnauthorized other = (CreatePlaylistUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(CreatePlaylistUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<CreatePlaylistPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreatePlaylistUnauthorized build() {
|
||||
return new CreatePlaylistUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* DeleteLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* DeleteLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
public class DeleteLibraryBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public DeleteLibraryResponseBody(
|
||||
public DeleteLibraryBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<DeleteLibraryErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody() {
|
||||
public DeleteLibraryBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody withErrors(List<DeleteLibraryErrors> errors) {
|
||||
public DeleteLibraryBadRequest withErrors(List<DeleteLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody withErrors(Optional<? extends List<DeleteLibraryErrors>> errors) {
|
||||
public DeleteLibraryBadRequest withErrors(Optional<? extends List<DeleteLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeleteLibraryResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public DeleteLibraryBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeleteLibraryResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public DeleteLibraryBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryResponseBody other = (DeleteLibraryResponseBody) o;
|
||||
DeleteLibraryBadRequest other = (DeleteLibraryBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryResponseBody.class,
|
||||
return Utils.toString(DeleteLibraryBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class DeleteLibraryResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryResponseBody build() {
|
||||
return new DeleteLibraryResponseBody(
|
||||
public DeleteLibraryBadRequest build() {
|
||||
return new DeleteLibraryBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class DeleteLibraryErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class DeleteLibraryErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public DeleteLibraryErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class DeleteLibraryErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class DeleteLibraryErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class DeleteLibraryErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withCode(double code) {
|
||||
public DeleteLibraryErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withCode(Optional<Double> code) {
|
||||
public DeleteLibraryErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class DeleteLibraryErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withStatus(double status) {
|
||||
public DeleteLibraryErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryErrors withStatus(Optional<Double> status) {
|
||||
public DeleteLibraryErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class DeleteLibraryErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class DeleteLibraryErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class DeleteLibraryLibraryErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public DeleteLibraryLibraryErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryLibraryErrors other = (DeleteLibraryLibraryErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryLibraryErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryLibraryErrors build() {
|
||||
return new DeleteLibraryLibraryErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* DeleteLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class DeleteLibraryUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<DeleteLibraryLibraryErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public DeleteLibraryUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<DeleteLibraryLibraryErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public DeleteLibraryUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<DeleteLibraryLibraryErrors>> errors(){
|
||||
return (Optional<List<DeleteLibraryLibraryErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeleteLibraryUnauthorized withErrors(List<DeleteLibraryLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryUnauthorized withErrors(Optional<? extends List<DeleteLibraryLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeleteLibraryUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeleteLibraryUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeleteLibraryUnauthorized other = (DeleteLibraryUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeleteLibraryUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<DeleteLibraryLibraryErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<DeleteLibraryLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<DeleteLibraryLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteLibraryUnauthorized build() {
|
||||
return new DeleteLibraryUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* DeletePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* DeletePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
public class DeletePlaylistBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public DeletePlaylistResponseBody(
|
||||
public DeletePlaylistBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<DeletePlaylistErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody() {
|
||||
public DeletePlaylistBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody withErrors(List<DeletePlaylistErrors> errors) {
|
||||
public DeletePlaylistBadRequest withErrors(List<DeletePlaylistErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody withErrors(Optional<? extends List<DeletePlaylistErrors>> errors) {
|
||||
public DeletePlaylistBadRequest withErrors(Optional<? extends List<DeletePlaylistErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeletePlaylistResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public DeletePlaylistBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeletePlaylistResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public DeletePlaylistBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistResponseBody other = (DeletePlaylistResponseBody) o;
|
||||
DeletePlaylistBadRequest other = (DeletePlaylistBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistResponseBody.class,
|
||||
return Utils.toString(DeletePlaylistBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class DeletePlaylistResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistResponseBody build() {
|
||||
return new DeletePlaylistResponseBody(
|
||||
public DeletePlaylistBadRequest build() {
|
||||
return new DeletePlaylistBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class DeletePlaylistErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class DeletePlaylistErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public DeletePlaylistErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class DeletePlaylistErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class DeletePlaylistErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class DeletePlaylistErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withCode(double code) {
|
||||
public DeletePlaylistErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withCode(Optional<Double> code) {
|
||||
public DeletePlaylistErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class DeletePlaylistErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withStatus(double status) {
|
||||
public DeletePlaylistErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistErrors withStatus(Optional<Double> status) {
|
||||
public DeletePlaylistErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class DeletePlaylistErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class DeletePlaylistErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class DeletePlaylistPlaylistsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public DeletePlaylistPlaylistsErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistPlaylistsErrors other = (DeletePlaylistPlaylistsErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistPlaylistsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistPlaylistsErrors build() {
|
||||
return new DeletePlaylistPlaylistsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* DeletePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class DeletePlaylistUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public DeletePlaylistUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public DeletePlaylistUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<DeletePlaylistPlaylistsErrors>> errors(){
|
||||
return (Optional<List<DeletePlaylistPlaylistsErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public DeletePlaylistUnauthorized withErrors(List<DeletePlaylistPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistUnauthorized withErrors(Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeletePlaylistUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public DeletePlaylistUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DeletePlaylistUnauthorized other = (DeletePlaylistUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(DeletePlaylistUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<DeletePlaylistPlaylistsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeletePlaylistUnauthorized build() {
|
||||
return new DeletePlaylistUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* EnablePaperTrailResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* EnablePaperTrailBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
public class EnablePaperTrailBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public EnablePaperTrailResponseBody(
|
||||
public EnablePaperTrailBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<EnablePaperTrailErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody() {
|
||||
public EnablePaperTrailBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody withErrors(List<EnablePaperTrailErrors> errors) {
|
||||
public EnablePaperTrailBadRequest withErrors(List<EnablePaperTrailErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody withErrors(Optional<? extends List<EnablePaperTrailErrors>> errors) {
|
||||
public EnablePaperTrailBadRequest withErrors(Optional<? extends List<EnablePaperTrailErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public EnablePaperTrailResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public EnablePaperTrailBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public EnablePaperTrailResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public EnablePaperTrailBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnablePaperTrailResponseBody other = (EnablePaperTrailResponseBody) o;
|
||||
EnablePaperTrailBadRequest other = (EnablePaperTrailBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(EnablePaperTrailResponseBody.class,
|
||||
return Utils.toString(EnablePaperTrailBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailResponseBody build() {
|
||||
return new EnablePaperTrailResponseBody(
|
||||
public EnablePaperTrailBadRequest build() {
|
||||
return new EnablePaperTrailBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class EnablePaperTrailErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class EnablePaperTrailErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public EnablePaperTrailErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class EnablePaperTrailErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class EnablePaperTrailErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class EnablePaperTrailErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withCode(double code) {
|
||||
public EnablePaperTrailErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withCode(Optional<Double> code) {
|
||||
public EnablePaperTrailErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class EnablePaperTrailErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withStatus(double status) {
|
||||
public EnablePaperTrailErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailErrors withStatus(Optional<Double> status) {
|
||||
public EnablePaperTrailErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class EnablePaperTrailErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class EnablePaperTrailErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class EnablePaperTrailLogErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public EnablePaperTrailLogErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnablePaperTrailLogErrors other = (EnablePaperTrailLogErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(EnablePaperTrailLogErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailLogErrors build() {
|
||||
return new EnablePaperTrailLogErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* EnablePaperTrailUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class EnablePaperTrailUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<EnablePaperTrailLogErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public EnablePaperTrailUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<EnablePaperTrailLogErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public EnablePaperTrailUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<EnablePaperTrailLogErrors>> errors(){
|
||||
return (Optional<List<EnablePaperTrailLogErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public EnablePaperTrailUnauthorized withErrors(List<EnablePaperTrailLogErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailUnauthorized withErrors(Optional<? extends List<EnablePaperTrailLogErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public EnablePaperTrailUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public EnablePaperTrailUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
EnablePaperTrailUnauthorized other = (EnablePaperTrailUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(EnablePaperTrailUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<EnablePaperTrailLogErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<EnablePaperTrailLogErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<EnablePaperTrailLogErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnablePaperTrailUnauthorized build() {
|
||||
return new EnablePaperTrailUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class Errors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class Errors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public Errors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class Errors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class Errors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class Errors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Errors withCode(double code) {
|
||||
public Errors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withCode(Optional<Double> code) {
|
||||
public Errors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class Errors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withStatus(double status) {
|
||||
public Errors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Errors withStatus(Optional<Double> status) {
|
||||
public Errors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class Errors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class Errors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetAllLibrariesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetAllLibrariesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
public class GetAllLibrariesBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesResponseBody(
|
||||
public GetAllLibrariesBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetAllLibrariesErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody() {
|
||||
public GetAllLibrariesBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody withErrors(List<GetAllLibrariesErrors> errors) {
|
||||
public GetAllLibrariesBadRequest withErrors(List<GetAllLibrariesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody withErrors(Optional<? extends List<GetAllLibrariesErrors>> errors) {
|
||||
public GetAllLibrariesBadRequest withErrors(Optional<? extends List<GetAllLibrariesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAllLibrariesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetAllLibrariesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAllLibrariesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetAllLibrariesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAllLibrariesResponseBody other = (GetAllLibrariesResponseBody) o;
|
||||
GetAllLibrariesBadRequest other = (GetAllLibrariesBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAllLibrariesResponseBody.class,
|
||||
return Utils.toString(GetAllLibrariesBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody build() {
|
||||
return new GetAllLibrariesResponseBody(
|
||||
public GetAllLibrariesBadRequest build() {
|
||||
return new GetAllLibrariesBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetAllLibrariesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetAllLibrariesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetAllLibrariesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetAllLibrariesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetAllLibrariesErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAllLibrariesErrors withCode(double code) {
|
||||
public GetAllLibrariesErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesErrors withCode(Optional<Double> code) {
|
||||
public GetAllLibrariesErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetAllLibrariesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesErrors withStatus(double status) {
|
||||
public GetAllLibrariesErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesErrors withStatus(Optional<Double> status) {
|
||||
public GetAllLibrariesErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetAllLibrariesErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetAllLibrariesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetAllLibrariesLibraryErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesLibraryErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAllLibrariesLibraryErrors other = (GetAllLibrariesLibraryErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAllLibrariesLibraryErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesLibraryErrors build() {
|
||||
return new GetAllLibrariesLibraryErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetAllLibrariesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetAllLibrariesUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetAllLibrariesLibraryErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetAllLibrariesLibraryErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetAllLibrariesUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetAllLibrariesLibraryErrors>> errors(){
|
||||
return (Optional<List<GetAllLibrariesLibraryErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAllLibrariesUnauthorized withErrors(List<GetAllLibrariesLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesUnauthorized withErrors(Optional<? extends List<GetAllLibrariesLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAllLibrariesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAllLibrariesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAllLibrariesUnauthorized other = (GetAllLibrariesUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAllLibrariesUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetAllLibrariesLibraryErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetAllLibrariesLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetAllLibrariesLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesUnauthorized build() {
|
||||
return new GetAllLibrariesUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetAvailableClientsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetAvailableClientsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
public class GetAvailableClientsBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetAvailableClientsResponseBody(
|
||||
public GetAvailableClientsBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetAvailableClientsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody() {
|
||||
public GetAvailableClientsBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody withErrors(List<GetAvailableClientsErrors> errors) {
|
||||
public GetAvailableClientsBadRequest withErrors(List<GetAvailableClientsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody withErrors(Optional<? extends List<GetAvailableClientsErrors>> errors) {
|
||||
public GetAvailableClientsBadRequest withErrors(Optional<? extends List<GetAvailableClientsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAvailableClientsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetAvailableClientsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAvailableClientsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetAvailableClientsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsResponseBody other = (GetAvailableClientsResponseBody) o;
|
||||
GetAvailableClientsBadRequest other = (GetAvailableClientsBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsResponseBody.class,
|
||||
return Utils.toString(GetAvailableClientsBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsResponseBody build() {
|
||||
return new GetAvailableClientsResponseBody(
|
||||
public GetAvailableClientsBadRequest build() {
|
||||
return new GetAvailableClientsBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetAvailableClientsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetAvailableClientsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetAvailableClientsErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetAvailableClientsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetAvailableClientsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetAvailableClientsErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withCode(double code) {
|
||||
public GetAvailableClientsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withCode(Optional<Double> code) {
|
||||
public GetAvailableClientsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetAvailableClientsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withStatus(double status) {
|
||||
public GetAvailableClientsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsErrors withStatus(Optional<Double> status) {
|
||||
public GetAvailableClientsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetAvailableClientsErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetAvailableClientsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetAvailableClientsServerErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetAvailableClientsServerErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsServerErrors other = (GetAvailableClientsServerErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsServerErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsServerErrors build() {
|
||||
return new GetAvailableClientsServerErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetAvailableClientsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetAvailableClientsUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetAvailableClientsServerErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetAvailableClientsUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetAvailableClientsServerErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetAvailableClientsUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetAvailableClientsServerErrors>> errors(){
|
||||
return (Optional<List<GetAvailableClientsServerErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetAvailableClientsUnauthorized withErrors(List<GetAvailableClientsServerErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsUnauthorized withErrors(Optional<? extends List<GetAvailableClientsServerErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAvailableClientsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetAvailableClientsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetAvailableClientsUnauthorized other = (GetAvailableClientsUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetAvailableClientsUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetAvailableClientsServerErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetAvailableClientsServerErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetAvailableClientsServerErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAvailableClientsUnauthorized build() {
|
||||
return new GetAvailableClientsUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetBandwidthStatisticsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetBandwidthStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
public class GetBandwidthStatisticsBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetBandwidthStatisticsResponseBody(
|
||||
public GetBandwidthStatisticsBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetBandwidthStatisticsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsResponseBody() {
|
||||
public GetBandwidthStatisticsBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsResponseBody withErrors(List<GetBandwidthStatisticsErrors> errors) {
|
||||
public GetBandwidthStatisticsBadRequest withErrors(List<GetBandwidthStatisticsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsResponseBody withErrors(Optional<? extends List<GetBandwidthStatisticsErrors>> errors) {
|
||||
public GetBandwidthStatisticsBadRequest withErrors(Optional<? extends List<GetBandwidthStatisticsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBandwidthStatisticsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetBandwidthStatisticsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBandwidthStatisticsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetBandwidthStatisticsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetBandwidthStatisticsResponseBody other = (GetBandwidthStatisticsResponseBody) o;
|
||||
GetBandwidthStatisticsBadRequest other = (GetBandwidthStatisticsBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetBandwidthStatisticsResponseBody.class,
|
||||
return Utils.toString(GetBandwidthStatisticsBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsResponseBody build() {
|
||||
return new GetBandwidthStatisticsResponseBody(
|
||||
public GetBandwidthStatisticsBadRequest build() {
|
||||
return new GetBandwidthStatisticsBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetBandwidthStatisticsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetBandwidthStatisticsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetBandwidthStatisticsErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetBandwidthStatisticsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetBandwidthStatisticsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetBandwidthStatisticsErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsErrors withCode(double code) {
|
||||
public GetBandwidthStatisticsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsErrors withCode(Optional<Double> code) {
|
||||
public GetBandwidthStatisticsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetBandwidthStatisticsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsErrors withStatus(double status) {
|
||||
public GetBandwidthStatisticsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsErrors withStatus(Optional<Double> status) {
|
||||
public GetBandwidthStatisticsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetBandwidthStatisticsErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetBandwidthStatisticsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetBandwidthStatisticsStatisticsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetBandwidthStatisticsStatisticsErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetBandwidthStatisticsStatisticsErrors other = (GetBandwidthStatisticsStatisticsErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetBandwidthStatisticsStatisticsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsStatisticsErrors build() {
|
||||
return new GetBandwidthStatisticsStatisticsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetBandwidthStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetBandwidthStatisticsUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetBandwidthStatisticsUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetBandwidthStatisticsStatisticsErrors>> errors(){
|
||||
return (Optional<List<GetBandwidthStatisticsStatisticsErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsUnauthorized withErrors(List<GetBandwidthStatisticsStatisticsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsUnauthorized withErrors(Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBandwidthStatisticsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBandwidthStatisticsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetBandwidthStatisticsUnauthorized other = (GetBandwidthStatisticsUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetBandwidthStatisticsUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetBandwidthStatisticsStatisticsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBandwidthStatisticsUnauthorized build() {
|
||||
return new GetBandwidthStatisticsUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetBannerImageResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetBannerImageBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetBannerImageResponseBody extends RuntimeException {
|
||||
public class GetBannerImageBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetBannerImageResponseBody(
|
||||
public GetBannerImageBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetBannerImageErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetBannerImageResponseBody() {
|
||||
public GetBannerImageBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBannerImageResponseBody withErrors(List<GetBannerImageErrors> errors) {
|
||||
public GetBannerImageBadRequest withErrors(List<GetBannerImageErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageResponseBody withErrors(Optional<? extends List<GetBannerImageErrors>> errors) {
|
||||
public GetBannerImageBadRequest withErrors(Optional<? extends List<GetBannerImageErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBannerImageResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetBannerImageBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBannerImageResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetBannerImageBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetBannerImageResponseBody other = (GetBannerImageResponseBody) o;
|
||||
GetBannerImageBadRequest other = (GetBannerImageBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetBannerImageResponseBody.class,
|
||||
return Utils.toString(GetBannerImageBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetBannerImageResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageResponseBody build() {
|
||||
return new GetBannerImageResponseBody(
|
||||
public GetBannerImageBadRequest build() {
|
||||
return new GetBannerImageBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetBannerImageErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetBannerImageErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetBannerImageErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetBannerImageErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetBannerImageErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetBannerImageErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBannerImageErrors withCode(double code) {
|
||||
public GetBannerImageErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageErrors withCode(Optional<Double> code) {
|
||||
public GetBannerImageErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetBannerImageErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageErrors withStatus(double status) {
|
||||
public GetBannerImageErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageErrors withStatus(Optional<Double> status) {
|
||||
public GetBannerImageErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetBannerImageErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetBannerImageErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetBannerImageMediaErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetBannerImageMediaErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetBannerImageMediaErrors other = (GetBannerImageMediaErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetBannerImageMediaErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageMediaErrors build() {
|
||||
return new GetBannerImageMediaErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetBannerImageUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetBannerImageUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetBannerImageMediaErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetBannerImageUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetBannerImageMediaErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetBannerImageUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetBannerImageMediaErrors>> errors(){
|
||||
return (Optional<List<GetBannerImageMediaErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetBannerImageUnauthorized withErrors(List<GetBannerImageMediaErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageUnauthorized withErrors(Optional<? extends List<GetBannerImageMediaErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBannerImageUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetBannerImageUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetBannerImageUnauthorized other = (GetBannerImageUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetBannerImageUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetBannerImageMediaErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetBannerImageMediaErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetBannerImageMediaErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetBannerImageUnauthorized build() {
|
||||
return new GetBannerImageUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetButlerTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetButlerTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
public class GetButlerTasksBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetButlerTasksResponseBody(
|
||||
public GetButlerTasksBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetButlerTasksErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody() {
|
||||
public GetButlerTasksBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody withErrors(List<GetButlerTasksErrors> errors) {
|
||||
public GetButlerTasksBadRequest withErrors(List<GetButlerTasksErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody withErrors(Optional<? extends List<GetButlerTasksErrors>> errors) {
|
||||
public GetButlerTasksBadRequest withErrors(Optional<? extends List<GetButlerTasksErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetButlerTasksResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetButlerTasksBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetButlerTasksResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetButlerTasksBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksResponseBody other = (GetButlerTasksResponseBody) o;
|
||||
GetButlerTasksBadRequest other = (GetButlerTasksBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksResponseBody.class,
|
||||
return Utils.toString(GetButlerTasksBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetButlerTasksResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksResponseBody build() {
|
||||
return new GetButlerTasksResponseBody(
|
||||
public GetButlerTasksBadRequest build() {
|
||||
return new GetButlerTasksBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetButlerTasksButlerErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetButlerTasksButlerErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksButlerErrors other = (GetButlerTasksButlerErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksButlerErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksButlerErrors build() {
|
||||
return new GetButlerTasksButlerErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetButlerTasksErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetButlerTasksErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetButlerTasksErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetButlerTasksErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetButlerTasksErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetButlerTasksErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withCode(double code) {
|
||||
public GetButlerTasksErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withCode(Optional<Double> code) {
|
||||
public GetButlerTasksErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetButlerTasksErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withStatus(double status) {
|
||||
public GetButlerTasksErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksErrors withStatus(Optional<Double> status) {
|
||||
public GetButlerTasksErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetButlerTasksErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetButlerTasksErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetButlerTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetButlerTasksUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetButlerTasksButlerErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetButlerTasksUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetButlerTasksButlerErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetButlerTasksUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetButlerTasksButlerErrors>> errors(){
|
||||
return (Optional<List<GetButlerTasksButlerErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetButlerTasksUnauthorized withErrors(List<GetButlerTasksButlerErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksUnauthorized withErrors(Optional<? extends List<GetButlerTasksButlerErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetButlerTasksUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetButlerTasksUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetButlerTasksUnauthorized other = (GetButlerTasksUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetButlerTasksUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetButlerTasksButlerErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetButlerTasksButlerErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetButlerTasksButlerErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetButlerTasksUnauthorized build() {
|
||||
return new GetButlerTasksUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetCompanionsDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetCompanionsDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
public class GetCompanionsDataBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetCompanionsDataResponseBody(
|
||||
public GetCompanionsDataBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetCompanionsDataErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetCompanionsDataResponseBody() {
|
||||
public GetCompanionsDataBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetCompanionsDataResponseBody withErrors(List<GetCompanionsDataErrors> errors) {
|
||||
public GetCompanionsDataBadRequest withErrors(List<GetCompanionsDataErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataResponseBody withErrors(Optional<? extends List<GetCompanionsDataErrors>> errors) {
|
||||
public GetCompanionsDataBadRequest withErrors(Optional<? extends List<GetCompanionsDataErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetCompanionsDataResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetCompanionsDataBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetCompanionsDataResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetCompanionsDataBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetCompanionsDataResponseBody other = (GetCompanionsDataResponseBody) o;
|
||||
GetCompanionsDataBadRequest other = (GetCompanionsDataBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetCompanionsDataResponseBody.class,
|
||||
return Utils.toString(GetCompanionsDataBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataResponseBody build() {
|
||||
return new GetCompanionsDataResponseBody(
|
||||
public GetCompanionsDataBadRequest build() {
|
||||
return new GetCompanionsDataBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetCompanionsDataErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetCompanionsDataErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetCompanionsDataErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetCompanionsDataErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetCompanionsDataErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetCompanionsDataErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetCompanionsDataErrors withCode(double code) {
|
||||
public GetCompanionsDataErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataErrors withCode(Optional<Double> code) {
|
||||
public GetCompanionsDataErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetCompanionsDataErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataErrors withStatus(double status) {
|
||||
public GetCompanionsDataErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataErrors withStatus(Optional<Double> status) {
|
||||
public GetCompanionsDataErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetCompanionsDataErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetCompanionsDataErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetCompanionsDataPlexErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetCompanionsDataPlexErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetCompanionsDataPlexErrors other = (GetCompanionsDataPlexErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetCompanionsDataPlexErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataPlexErrors build() {
|
||||
return new GetCompanionsDataPlexErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetCompanionsDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetCompanionsDataUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetCompanionsDataPlexErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetCompanionsDataUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetCompanionsDataPlexErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetCompanionsDataUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetCompanionsDataPlexErrors>> errors(){
|
||||
return (Optional<List<GetCompanionsDataPlexErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetCompanionsDataUnauthorized withErrors(List<GetCompanionsDataPlexErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataUnauthorized withErrors(Optional<? extends List<GetCompanionsDataPlexErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetCompanionsDataUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetCompanionsDataUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetCompanionsDataUnauthorized other = (GetCompanionsDataUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetCompanionsDataUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetCompanionsDataPlexErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetCompanionsDataPlexErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetCompanionsDataPlexErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetCompanionsDataUnauthorized build() {
|
||||
return new GetCompanionsDataUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetDevicesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetDevicesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetDevicesResponseBody extends RuntimeException {
|
||||
public class GetDevicesBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetDevicesResponseBody(
|
||||
public GetDevicesBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetDevicesErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetDevicesResponseBody() {
|
||||
public GetDevicesBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetDevicesResponseBody withErrors(List<GetDevicesErrors> errors) {
|
||||
public GetDevicesBadRequest withErrors(List<GetDevicesErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesResponseBody withErrors(Optional<? extends List<GetDevicesErrors>> errors) {
|
||||
public GetDevicesBadRequest withErrors(Optional<? extends List<GetDevicesErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetDevicesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetDevicesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetDevicesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetDevicesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetDevicesResponseBody other = (GetDevicesResponseBody) o;
|
||||
GetDevicesBadRequest other = (GetDevicesBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetDevicesResponseBody.class,
|
||||
return Utils.toString(GetDevicesBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetDevicesResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesResponseBody build() {
|
||||
return new GetDevicesResponseBody(
|
||||
public GetDevicesBadRequest build() {
|
||||
return new GetDevicesBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetDevicesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetDevicesErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetDevicesErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetDevicesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetDevicesErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetDevicesErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetDevicesErrors withCode(double code) {
|
||||
public GetDevicesErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withCode(Optional<Double> code) {
|
||||
public GetDevicesErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetDevicesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withStatus(double status) {
|
||||
public GetDevicesErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesErrors withStatus(Optional<Double> status) {
|
||||
public GetDevicesErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetDevicesErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetDevicesErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -11,18 +11,18 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetUserDetailsErrors {
|
||||
public class GetDevicesServerErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetUserDetailsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetUserDetailsErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
public GetDevicesServerErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -45,12 +45,12 @@ public class GetUserDetailsErrors {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors() {
|
||||
public GetDevicesServerErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetUserDetailsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,37 +68,37 @@ public class GetUserDetailsErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors withCode(double code) {
|
||||
public GetDevicesServerErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors withCode(Optional<Double> code) {
|
||||
public GetDevicesServerErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors withMessage(String message) {
|
||||
public GetDevicesServerErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors withMessage(Optional<String> message) {
|
||||
public GetDevicesServerErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors withStatus(double status) {
|
||||
public GetDevicesServerErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors withStatus(Optional<Double> status) {
|
||||
public GetDevicesServerErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -112,7 +112,7 @@ public class GetUserDetailsErrors {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetUserDetailsErrors other = (GetUserDetailsErrors) o;
|
||||
GetDevicesServerErrors other = (GetDevicesServerErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
@@ -129,7 +129,7 @@ public class GetUserDetailsErrors {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetUserDetailsErrors.class,
|
||||
return Utils.toString(GetDevicesServerErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
@@ -137,23 +137,23 @@ public class GetUserDetailsErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,20 +171,20 @@ public class GetUserDetailsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetUserDetailsErrors build() {
|
||||
return new GetUserDetailsErrors(
|
||||
public GetDevicesServerErrors build() {
|
||||
return new GetDevicesServerErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetDevicesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetDevicesUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetDevicesServerErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetDevicesUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetDevicesServerErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetDevicesUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetDevicesServerErrors>> errors(){
|
||||
return (Optional<List<GetDevicesServerErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetDevicesUnauthorized withErrors(List<GetDevicesServerErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesUnauthorized withErrors(Optional<? extends List<GetDevicesServerErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetDevicesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetDevicesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetDevicesUnauthorized other = (GetDevicesUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetDevicesUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetDevicesServerErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetDevicesServerErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetDevicesServerErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetDevicesUnauthorized build() {
|
||||
return new GetDevicesUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetFileHashResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetFileHashBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetFileHashResponseBody extends RuntimeException {
|
||||
public class GetFileHashBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetFileHashResponseBody(
|
||||
public GetFileHashBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetFileHashErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetFileHashResponseBody() {
|
||||
public GetFileHashBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetFileHashResponseBody withErrors(List<GetFileHashErrors> errors) {
|
||||
public GetFileHashBadRequest withErrors(List<GetFileHashErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashResponseBody withErrors(Optional<? extends List<GetFileHashErrors>> errors) {
|
||||
public GetFileHashBadRequest withErrors(Optional<? extends List<GetFileHashErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetFileHashResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetFileHashBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetFileHashResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetFileHashBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetFileHashResponseBody other = (GetFileHashResponseBody) o;
|
||||
GetFileHashBadRequest other = (GetFileHashBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetFileHashResponseBody.class,
|
||||
return Utils.toString(GetFileHashBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetFileHashResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashResponseBody build() {
|
||||
return new GetFileHashResponseBody(
|
||||
public GetFileHashBadRequest build() {
|
||||
return new GetFileHashBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetFileHashErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetFileHashErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetFileHashErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetFileHashErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetFileHashErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetFileHashErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetFileHashErrors withCode(double code) {
|
||||
public GetFileHashErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashErrors withCode(Optional<Double> code) {
|
||||
public GetFileHashErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetFileHashErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashErrors withStatus(double status) {
|
||||
public GetFileHashErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashErrors withStatus(Optional<Double> status) {
|
||||
public GetFileHashErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetFileHashErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetFileHashErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetFileHashLibraryErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetFileHashLibraryErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetFileHashLibraryErrors other = (GetFileHashLibraryErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetFileHashLibraryErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashLibraryErrors build() {
|
||||
return new GetFileHashLibraryErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetFileHashUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetFileHashUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetFileHashLibraryErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetFileHashUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetFileHashLibraryErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetFileHashUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetFileHashLibraryErrors>> errors(){
|
||||
return (Optional<List<GetFileHashLibraryErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetFileHashUnauthorized withErrors(List<GetFileHashLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashUnauthorized withErrors(Optional<? extends List<GetFileHashLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetFileHashUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetFileHashUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetFileHashUnauthorized other = (GetFileHashUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetFileHashUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetFileHashLibraryErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetFileHashLibraryErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetFileHashLibraryErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetFileHashUnauthorized build() {
|
||||
return new GetFileHashUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetGeoDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetGeoDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetGeoDataResponseBody extends RuntimeException {
|
||||
public class GetGeoDataBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetGeoDataResponseBody(
|
||||
public GetGeoDataBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetGeoDataErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetGeoDataResponseBody() {
|
||||
public GetGeoDataBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGeoDataResponseBody withErrors(List<GetGeoDataErrors> errors) {
|
||||
public GetGeoDataBadRequest withErrors(List<GetGeoDataErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataResponseBody withErrors(Optional<? extends List<GetGeoDataErrors>> errors) {
|
||||
public GetGeoDataBadRequest withErrors(Optional<? extends List<GetGeoDataErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGeoDataResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetGeoDataBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGeoDataResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetGeoDataBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetGeoDataResponseBody other = (GetGeoDataResponseBody) o;
|
||||
GetGeoDataBadRequest other = (GetGeoDataBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetGeoDataResponseBody.class,
|
||||
return Utils.toString(GetGeoDataBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetGeoDataResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataResponseBody build() {
|
||||
return new GetGeoDataResponseBody(
|
||||
public GetGeoDataBadRequest build() {
|
||||
return new GetGeoDataBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetGeoDataErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetGeoDataErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetGeoDataErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetGeoDataErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetGeoDataErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetGeoDataErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGeoDataErrors withCode(double code) {
|
||||
public GetGeoDataErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataErrors withCode(Optional<Double> code) {
|
||||
public GetGeoDataErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetGeoDataErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataErrors withStatus(double status) {
|
||||
public GetGeoDataErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataErrors withStatus(Optional<Double> status) {
|
||||
public GetGeoDataErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetGeoDataErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetGeoDataErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetGeoDataPlexErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetGeoDataPlexErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetGeoDataPlexErrors other = (GetGeoDataPlexErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetGeoDataPlexErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataPlexErrors build() {
|
||||
return new GetGeoDataPlexErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetGeoDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetGeoDataUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetGeoDataPlexErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetGeoDataUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetGeoDataPlexErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetGeoDataUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetGeoDataPlexErrors>> errors(){
|
||||
return (Optional<List<GetGeoDataPlexErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGeoDataUnauthorized withErrors(List<GetGeoDataPlexErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataUnauthorized withErrors(Optional<? extends List<GetGeoDataPlexErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGeoDataUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGeoDataUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetGeoDataUnauthorized other = (GetGeoDataUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetGeoDataUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetGeoDataPlexErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetGeoDataPlexErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetGeoDataPlexErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGeoDataUnauthorized build() {
|
||||
return new GetGeoDataUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetGlobalHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetGlobalHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
public class GetGlobalHubsBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetGlobalHubsResponseBody(
|
||||
public GetGlobalHubsBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetGlobalHubsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetGlobalHubsResponseBody() {
|
||||
public GetGlobalHubsBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGlobalHubsResponseBody withErrors(List<GetGlobalHubsErrors> errors) {
|
||||
public GetGlobalHubsBadRequest withErrors(List<GetGlobalHubsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsResponseBody withErrors(Optional<? extends List<GetGlobalHubsErrors>> errors) {
|
||||
public GetGlobalHubsBadRequest withErrors(Optional<? extends List<GetGlobalHubsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGlobalHubsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetGlobalHubsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGlobalHubsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetGlobalHubsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetGlobalHubsResponseBody other = (GetGlobalHubsResponseBody) o;
|
||||
GetGlobalHubsBadRequest other = (GetGlobalHubsBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetGlobalHubsResponseBody.class,
|
||||
return Utils.toString(GetGlobalHubsBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsResponseBody build() {
|
||||
return new GetGlobalHubsResponseBody(
|
||||
public GetGlobalHubsBadRequest build() {
|
||||
return new GetGlobalHubsBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetGlobalHubsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetGlobalHubsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetGlobalHubsErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetGlobalHubsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetGlobalHubsErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetGlobalHubsErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGlobalHubsErrors withCode(double code) {
|
||||
public GetGlobalHubsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsErrors withCode(Optional<Double> code) {
|
||||
public GetGlobalHubsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetGlobalHubsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsErrors withStatus(double status) {
|
||||
public GetGlobalHubsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsErrors withStatus(Optional<Double> status) {
|
||||
public GetGlobalHubsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetGlobalHubsErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetGlobalHubsErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetGlobalHubsHubsErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetGlobalHubsHubsErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetGlobalHubsHubsErrors other = (GetGlobalHubsHubsErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetGlobalHubsHubsErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsHubsErrors build() {
|
||||
return new GetGlobalHubsHubsErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetGlobalHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetGlobalHubsUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetGlobalHubsHubsErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetGlobalHubsUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetGlobalHubsHubsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetGlobalHubsUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetGlobalHubsHubsErrors>> errors(){
|
||||
return (Optional<List<GetGlobalHubsHubsErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetGlobalHubsUnauthorized withErrors(List<GetGlobalHubsHubsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsUnauthorized withErrors(Optional<? extends List<GetGlobalHubsHubsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGlobalHubsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetGlobalHubsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetGlobalHubsUnauthorized other = (GetGlobalHubsUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetGlobalHubsUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetGlobalHubsHubsErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetGlobalHubsHubsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetGlobalHubsHubsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetGlobalHubsUnauthorized build() {
|
||||
return new GetGlobalHubsUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetHomeDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetHomeDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetHomeDataResponseBody extends RuntimeException {
|
||||
public class GetHomeDataBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetHomeDataResponseBody(
|
||||
public GetHomeDataBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetHomeDataErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetHomeDataResponseBody() {
|
||||
public GetHomeDataBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetHomeDataResponseBody withErrors(List<GetHomeDataErrors> errors) {
|
||||
public GetHomeDataBadRequest withErrors(List<GetHomeDataErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataResponseBody withErrors(Optional<? extends List<GetHomeDataErrors>> errors) {
|
||||
public GetHomeDataBadRequest withErrors(Optional<? extends List<GetHomeDataErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetHomeDataResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetHomeDataBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetHomeDataResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetHomeDataBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetHomeDataResponseBody other = (GetHomeDataResponseBody) o;
|
||||
GetHomeDataBadRequest other = (GetHomeDataBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetHomeDataResponseBody.class,
|
||||
return Utils.toString(GetHomeDataBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetHomeDataResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataResponseBody build() {
|
||||
return new GetHomeDataResponseBody(
|
||||
public GetHomeDataBadRequest build() {
|
||||
return new GetHomeDataBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Double;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -22,7 +22,7 @@ public class GetHomeDataErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Double> code;
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
@@ -30,13 +30,13 @@ public class GetHomeDataErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Double> status;
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetHomeDataErrors(
|
||||
@JsonProperty("code") Optional<Double> code,
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Double> status) {
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
@@ -50,7 +50,7 @@ public class GetHomeDataErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> code() {
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class GetHomeDataErrors {
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Double> status() {
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ public class GetHomeDataErrors {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetHomeDataErrors withCode(double code) {
|
||||
public GetHomeDataErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataErrors withCode(Optional<Double> code) {
|
||||
public GetHomeDataErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -92,13 +92,13 @@ public class GetHomeDataErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataErrors withStatus(double status) {
|
||||
public GetHomeDataErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataErrors withStatus(Optional<Double> status) {
|
||||
public GetHomeDataErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -137,23 +137,23 @@ public class GetHomeDataErrors {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Double> code = Optional.empty();
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Double> status = Optional.empty();
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(double code) {
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Double> code) {
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
@@ -171,13 +171,13 @@ public class GetHomeDataErrors {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(double status) {
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Double> status) {
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class GetHomeDataPlexErrors {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("code")
|
||||
private Optional<Long> code;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("message")
|
||||
private Optional<String> message;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("status")
|
||||
private Optional<Long> status;
|
||||
|
||||
@JsonCreator
|
||||
public GetHomeDataPlexErrors(
|
||||
@JsonProperty("code") Optional<Long> code,
|
||||
@JsonProperty("message") Optional<String> message,
|
||||
@JsonProperty("status") Optional<Long> status) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
Utils.checkNotNull(message, "message");
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors() {
|
||||
this(Optional.empty(), Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<String> message() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Long> status() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors withCode(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors withCode(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors withMessage(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors withMessage(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors withStatus(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors withStatus(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetHomeDataPlexErrors other = (GetHomeDataPlexErrors) o;
|
||||
return
|
||||
Objects.deepEquals(this.code, other.code) &&
|
||||
Objects.deepEquals(this.message, other.message) &&
|
||||
Objects.deepEquals(this.status, other.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetHomeDataPlexErrors.class,
|
||||
"code", code,
|
||||
"message", message,
|
||||
"status", status);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<Long> code = Optional.empty();
|
||||
|
||||
private Optional<String> message = Optional.empty();
|
||||
|
||||
private Optional<Long> status = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder code(long code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = Optional.ofNullable(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder code(Optional<Long> code) {
|
||||
Utils.checkNotNull(code, "code");
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(String message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = Optional.ofNullable(message);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder message(Optional<String> message) {
|
||||
Utils.checkNotNull(message, "message");
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(long status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = Optional.ofNullable(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder status(Optional<Long> status) {
|
||||
Utils.checkNotNull(status, "status");
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataPlexErrors build() {
|
||||
return new GetHomeDataPlexErrors(
|
||||
code,
|
||||
message,
|
||||
status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
package dev.plexapi.sdk.models.errors;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.io.InputStream;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetHomeDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
*/
|
||||
public class GetHomeDataUnauthorized extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
private Optional<? extends List<GetHomeDataPlexErrors>> errors;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("RawResponse")
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetHomeDataUnauthorized(
|
||||
@JsonProperty("errors") Optional<? extends List<GetHomeDataPlexErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.errors = errors;
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetHomeDataUnauthorized() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<List<GetHomeDataPlexErrors>> errors(){
|
||||
return (Optional<List<GetHomeDataPlexErrors>>) errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Optional<HttpResponse<InputStream>> rawResponse(){
|
||||
return (Optional<HttpResponse<InputStream>>) rawResponse;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetHomeDataUnauthorized withErrors(List<GetHomeDataPlexErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataUnauthorized withErrors(Optional<? extends List<GetHomeDataPlexErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetHomeDataUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetHomeDataUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetHomeDataUnauthorized other = (GetHomeDataUnauthorized) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return java.util.Objects.hash(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetHomeDataUnauthorized.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Optional<? extends List<GetHomeDataPlexErrors>> errors = Optional.empty();
|
||||
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder errors(List<GetHomeDataPlexErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder errors(Optional<? extends List<GetHomeDataPlexErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetHomeDataUnauthorized build() {
|
||||
return new GetHomeDataUnauthorized(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetLibraryDetailsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
* GetLibraryDetailsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
|
||||
*/
|
||||
public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
public class GetLibraryDetailsBadRequest extends RuntimeException {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("errors")
|
||||
@@ -35,7 +35,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
private Optional<? extends HttpResponse<InputStream>> rawResponse;
|
||||
|
||||
@JsonCreator
|
||||
public GetLibraryDetailsResponseBody(
|
||||
public GetLibraryDetailsBadRequest(
|
||||
@JsonProperty("errors") Optional<? extends List<GetLibraryDetailsErrors>> errors,
|
||||
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
@@ -44,7 +44,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
this.rawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public GetLibraryDetailsResponseBody() {
|
||||
public GetLibraryDetailsBadRequest() {
|
||||
this(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public GetLibraryDetailsResponseBody withErrors(List<GetLibraryDetailsErrors> errors) {
|
||||
public GetLibraryDetailsBadRequest withErrors(List<GetLibraryDetailsErrors> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = Optional.ofNullable(errors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryDetailsResponseBody withErrors(Optional<? extends List<GetLibraryDetailsErrors>> errors) {
|
||||
public GetLibraryDetailsBadRequest withErrors(Optional<? extends List<GetLibraryDetailsErrors>> errors) {
|
||||
Utils.checkNotNull(errors, "errors");
|
||||
this.errors = errors;
|
||||
return this;
|
||||
@@ -80,7 +80,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetLibraryDetailsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
public GetLibraryDetailsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = Optional.ofNullable(rawResponse);
|
||||
return this;
|
||||
@@ -89,7 +89,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*/
|
||||
public GetLibraryDetailsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
public GetLibraryDetailsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
|
||||
Utils.checkNotNull(rawResponse, "rawResponse");
|
||||
this.rawResponse = rawResponse;
|
||||
return this;
|
||||
@@ -103,7 +103,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
GetLibraryDetailsResponseBody other = (GetLibraryDetailsResponseBody) o;
|
||||
GetLibraryDetailsBadRequest other = (GetLibraryDetailsBadRequest) o;
|
||||
return
|
||||
Objects.deepEquals(this.errors, other.errors) &&
|
||||
Objects.deepEquals(this.rawResponse, other.rawResponse);
|
||||
@@ -118,7 +118,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toString(GetLibraryDetailsResponseBody.class,
|
||||
return Utils.toString(GetLibraryDetailsBadRequest.class,
|
||||
"errors", errors,
|
||||
"rawResponse", rawResponse);
|
||||
}
|
||||
@@ -163,8 +163,8 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetLibraryDetailsResponseBody build() {
|
||||
return new GetLibraryDetailsResponseBody(
|
||||
public GetLibraryDetailsBadRequest build() {
|
||||
return new GetLibraryDetailsBadRequest(
|
||||
errors,
|
||||
rawResponse);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user