ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.487.1

This commit is contained in:
speakeasybot
2025-02-10 00:28:48 +00:00
parent 3523b6a0c8
commit bf77d1e2b9
158 changed files with 17867 additions and 789 deletions

View File

@@ -11,6 +11,8 @@ import dev.plexapi.sdk.models.errors.GetActorsLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetActorsLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest;
import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized;
import dev.plexapi.sdk.models.errors.GetAllMediaLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetAllMediaLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetFileHashBadRequest;
@@ -50,6 +52,10 @@ import dev.plexapi.sdk.models.operations.GetActorsLibraryResponseBody;
import dev.plexapi.sdk.models.operations.GetAllLibrariesRequestBuilder;
import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse;
import dev.plexapi.sdk.models.operations.GetAllLibrariesResponseBody;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryRequest;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryRequestBuilder;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryResponse;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryResponseBody;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryQueryParamType;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequest;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequestBuilder;
@@ -132,6 +138,7 @@ public class Library implements
MethodCallGetLibraryDetails,
MethodCallDeleteLibrary,
MethodCallGetLibraryItems,
MethodCallGetAllMediaLibrary,
MethodCallGetRefreshLibraryMetadata,
MethodCallGetSearchLibrary,
MethodCallGetGenresLibrary,
@@ -1323,6 +1330,172 @@ public class Library implements
/**
* Get all media of library
* Retrieves a list of all general media data for this library.
*
* @return The call builder
*/
public GetAllMediaLibraryRequestBuilder getAllMediaLibrary() {
return new GetAllMediaLibraryRequestBuilder(this);
}
/**
* Get all media of library
* Retrieves a list of all general media data for this library.
*
* @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 GetAllMediaLibraryResponse getAllMediaLibrary(
GetAllMediaLibraryRequest request) throws Exception {
String _baseUrl = Utils.templateUrl(
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
String _url = Utils.generateURL(
GetAllMediaLibraryRequest.class,
_baseUrl,
"/library/sections/{sectionKey}/all",
request, null);
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
_req.addQueryParams(Utils.getQueryParams(
GetAllMediaLibraryRequest.class,
request,
null));
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
"get-all-media-library",
Optional.of(List.of()),
_hookSecuritySource),
_req.build());
HttpResponse<InputStream> _httpRes;
try {
_httpRes = _client.send(_r);
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-all-media-library",
Optional.of(List.of()),
_hookSecuritySource),
Optional.of(_httpRes),
Optional.empty());
} else {
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
"get-all-media-library",
Optional.of(List.of()),
_hookSecuritySource),
_httpRes);
}
} catch (Exception _e) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-all-media-library",
Optional.of(List.of()),
_hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
String _contentType = _httpRes
.headers()
.firstValue("Content-Type")
.orElse("application/octet-stream");
GetAllMediaLibraryResponse.Builder _resBuilder =
GetAllMediaLibraryResponse
.builder()
.contentType(_contentType)
.statusCode(_httpRes.statusCode())
.rawResponse(_httpRes);
GetAllMediaLibraryResponse _res = _resBuilder.build();
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetAllMediaLibraryResponseBody _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetAllMediaLibraryResponseBody>() {});
_res.withObject(Optional.ofNullable(_out));
return _res;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetAllMediaLibraryBadRequest _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetAllMediaLibraryBadRequest>() {});
_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(), "401")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetAllMediaLibraryUnauthorized _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetAllMediaLibraryUnauthorized>() {});
_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")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected status code received: " + _httpRes.statusCode(),
Utils.extractByteArrayFromBody(_httpRes));
}
/**
* Refresh Metadata Of The Library
* This endpoint Refreshes all the Metadata of the library.

View File

@@ -43,7 +43,7 @@ class SDKConfiguration {
} };
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "0.0.3";
public static final String SDK_VERSION = "0.11.6";
public static final String SDK_VERSION = "0.12.0";
public static final String GEN_VERSION = "2.506.0";
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
public static final String USER_AGENT =

View File

@@ -0,0 +1,173 @@
/*
* 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;
/**
* GetAllMediaLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class GetAllMediaLibraryBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetAllMediaLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetAllMediaLibraryBadRequest(
@JsonProperty("errors") Optional<? extends List<GetAllMediaLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetAllMediaLibraryBadRequest() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetAllMediaLibraryErrors>> errors(){
return (Optional<List<GetAllMediaLibraryErrors>>) 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 GetAllMediaLibraryBadRequest withErrors(List<GetAllMediaLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetAllMediaLibraryBadRequest withErrors(Optional<? extends List<GetAllMediaLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllMediaLibraryBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllMediaLibraryBadRequest 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;
}
GetAllMediaLibraryBadRequest other = (GetAllMediaLibraryBadRequest) 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(GetAllMediaLibraryBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetAllMediaLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetAllMediaLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetAllMediaLibraryErrors>> 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 GetAllMediaLibraryBadRequest build() {
return new GetAllMediaLibraryBadRequest(
errors,
rawResponse);
}
}
}

View File

@@ -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.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Integer> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonCreator
public GetAllMediaLibraryErrors(
@JsonProperty("code") Optional<Integer> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Integer> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetAllMediaLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetAllMediaLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetAllMediaLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetAllMediaLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetAllMediaLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetAllMediaLibraryErrors withStatus(Optional<Integer> 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;
}
GetAllMediaLibraryErrors other = (GetAllMediaLibraryErrors) 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(GetAllMediaLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Integer> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Integer> 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(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetAllMediaLibraryErrors build() {
return new GetAllMediaLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -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.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Integer> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonCreator
public GetAllMediaLibraryLibraryErrors(
@JsonProperty("code") Optional<Integer> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Integer> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetAllMediaLibraryLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetAllMediaLibraryLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetAllMediaLibraryLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetAllMediaLibraryLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetAllMediaLibraryLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetAllMediaLibraryLibraryErrors withStatus(Optional<Integer> 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;
}
GetAllMediaLibraryLibraryErrors other = (GetAllMediaLibraryLibraryErrors) 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(GetAllMediaLibraryLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Integer> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Integer> 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(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetAllMediaLibraryLibraryErrors build() {
return new GetAllMediaLibraryLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,173 @@
/*
* 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;
/**
* GetAllMediaLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class GetAllMediaLibraryUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetAllMediaLibraryLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetAllMediaLibraryUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetAllMediaLibraryLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetAllMediaLibraryUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetAllMediaLibraryLibraryErrors>> errors(){
return (Optional<List<GetAllMediaLibraryLibraryErrors>>) 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 GetAllMediaLibraryUnauthorized withErrors(List<GetAllMediaLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetAllMediaLibraryUnauthorized withErrors(Optional<? extends List<GetAllMediaLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllMediaLibraryUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllMediaLibraryUnauthorized 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;
}
GetAllMediaLibraryUnauthorized other = (GetAllMediaLibraryUnauthorized) 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(GetAllMediaLibraryUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetAllMediaLibraryLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetAllMediaLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetAllMediaLibraryLibraryErrors>> 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 GetAllMediaLibraryUnauthorized build() {
return new GetAllMediaLibraryUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
@@ -24,8 +24,11 @@ import java.util.Optional;
public class GetActorsLibraryMediaContainer {
/**
* Number of media items returned in this response.
*/
@JsonProperty("size")
private double size;
private int size;
/**
* Indicates whether syncing is allowed.
@@ -102,7 +105,7 @@ public class GetActorsLibraryMediaContainer {
@JsonCreator
public GetActorsLibraryMediaContainer(
@JsonProperty("size") double size,
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("identifier") String identifier,
@@ -144,7 +147,7 @@ public class GetActorsLibraryMediaContainer {
}
public GetActorsLibraryMediaContainer(
double size,
int size,
boolean allowSync,
String art,
String identifier,
@@ -159,8 +162,11 @@ public class GetActorsLibraryMediaContainer {
this(size, allowSync, art, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, viewMode, Optional.empty());
}
/**
* Number of media items returned in this response.
*/
@JsonIgnore
public double size() {
public int size() {
return size;
}
@@ -265,7 +271,10 @@ public class GetActorsLibraryMediaContainer {
return new Builder();
}
public GetActorsLibraryMediaContainer withSize(double size) {
/**
* Number of media items returned in this response.
*/
public GetActorsLibraryMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
@@ -451,7 +460,7 @@ public class GetActorsLibraryMediaContainer {
public final static class Builder {
private Double size;
private Integer size;
private Boolean allowSync;
@@ -481,7 +490,10 @@ public class GetActorsLibraryMediaContainer {
// force use of static builder() method
}
public Builder size(double size) {
/**
* Number of media items returned in this response.
*/
public Builder size(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;

View File

@@ -0,0 +1,39 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryActiveDirection - The direction of the sort. Can be either `asc` or `desc`.
*
*/
public enum GetAllMediaLibraryActiveDirection {
Ascending("asc"),
Descending("desc");
@JsonValue
private final String value;
private GetAllMediaLibraryActiveDirection(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetAllMediaLibraryActiveDirection> fromValue(String value) {
for (GetAllMediaLibraryActiveDirection o: GetAllMediaLibraryActiveDirection.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryCollection {
/**
* The user-made collection this media item belongs to
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetAllMediaLibraryCollection(
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
/**
* The user-made collection this media item belongs to
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The user-made collection this media item belongs to
*/
public GetAllMediaLibraryCollection withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryCollection other = (GetAllMediaLibraryCollection) o;
return
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryCollection.class,
"tag", tag);
}
public final static class Builder {
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The user-made collection this media item belongs to
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetAllMediaLibraryCollection build() {
return new GetAllMediaLibraryCollection(
tag);
}
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryCountry {
/**
* The country of origin of this media item
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetAllMediaLibraryCountry(
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
/**
* The country of origin of this media item
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The country of origin of this media item
*/
public GetAllMediaLibraryCountry withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryCountry other = (GetAllMediaLibraryCountry) o;
return
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryCountry.class,
"tag", tag);
}
public final static class Builder {
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The country of origin of this media item
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetAllMediaLibraryCountry build() {
return new GetAllMediaLibraryCountry(
tag);
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryDefaultDirection - The direction of the sort. Can be either `asc` or `desc`.
*
*/
public enum GetAllMediaLibraryDefaultDirection {
Ascending("asc"),
Descending("desc");
@JsonValue
private final String value;
private GetAllMediaLibraryDefaultDirection(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetAllMediaLibraryDefaultDirection> fromValue(String value) {
for (GetAllMediaLibraryDefaultDirection o: GetAllMediaLibraryDefaultDirection.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryDirector {
/**
* The role of Director
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetAllMediaLibraryDirector(
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
/**
* The role of Director
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The role of Director
*/
public GetAllMediaLibraryDirector withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryDirector other = (GetAllMediaLibraryDirector) o;
return
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryDirector.class,
"tag", tag);
}
public final static class Builder {
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The role of Director
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetAllMediaLibraryDirector build() {
return new GetAllMediaLibraryDirector(
tag);
}
}
}

View File

@@ -0,0 +1,199 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryField {
@JsonProperty("key")
private String key;
@JsonProperty("title")
private String title;
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("subType")
private Optional<String> subType;
@JsonCreator
public GetAllMediaLibraryField(
@JsonProperty("key") String key,
@JsonProperty("title") String title,
@JsonProperty("type") String type,
@JsonProperty("subType") Optional<String> subType) {
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(subType, "subType");
this.key = key;
this.title = title;
this.type = type;
this.subType = subType;
}
public GetAllMediaLibraryField(
String key,
String title,
String type) {
this(key, title, type, Optional.empty());
}
@JsonIgnore
public String key() {
return key;
}
@JsonIgnore
public String title() {
return title;
}
@JsonIgnore
public String type() {
return type;
}
@JsonIgnore
public Optional<String> subType() {
return subType;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryField withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllMediaLibraryField withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllMediaLibraryField withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllMediaLibraryField withSubType(String subType) {
Utils.checkNotNull(subType, "subType");
this.subType = Optional.ofNullable(subType);
return this;
}
public GetAllMediaLibraryField withSubType(Optional<String> subType) {
Utils.checkNotNull(subType, "subType");
this.subType = subType;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryField other = (GetAllMediaLibraryField) o;
return
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.subType, other.subType);
}
@Override
public int hashCode() {
return Objects.hash(
key,
title,
type,
subType);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryField.class,
"key", key,
"title", title,
"type", type,
"subType", subType);
}
public final static class Builder {
private String key;
private String title;
private String type;
private Optional<String> subType = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder subType(String subType) {
Utils.checkNotNull(subType, "subType");
this.subType = Optional.ofNullable(subType);
return this;
}
public Builder subType(Optional<String> subType) {
Utils.checkNotNull(subType, "subType");
this.subType = subType;
return this;
}
public GetAllMediaLibraryField build() {
return new GetAllMediaLibraryField(
key,
title,
type,
subType);
}
}
}

View File

@@ -0,0 +1,119 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.List;
import java.util.Objects;
public class GetAllMediaLibraryFieldType {
@JsonProperty("type")
private String type;
@JsonProperty("Operator")
private List<GetAllMediaLibraryOperator> operator;
@JsonCreator
public GetAllMediaLibraryFieldType(
@JsonProperty("type") String type,
@JsonProperty("Operator") List<GetAllMediaLibraryOperator> operator) {
Utils.checkNotNull(type, "type");
Utils.checkNotNull(operator, "operator");
this.type = type;
this.operator = operator;
}
@JsonIgnore
public String type() {
return type;
}
@JsonIgnore
public List<GetAllMediaLibraryOperator> operator() {
return operator;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryFieldType withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllMediaLibraryFieldType withOperator(List<GetAllMediaLibraryOperator> operator) {
Utils.checkNotNull(operator, "operator");
this.operator = operator;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryFieldType other = (GetAllMediaLibraryFieldType) o;
return
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.operator, other.operator);
}
@Override
public int hashCode() {
return Objects.hash(
type,
operator);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryFieldType.class,
"type", type,
"operator", operator);
}
public final static class Builder {
private String type;
private List<GetAllMediaLibraryOperator> operator;
private Builder() {
// force use of static builder() method
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder operator(List<GetAllMediaLibraryOperator> operator) {
Utils.checkNotNull(operator, "operator");
this.operator = operator;
return this;
}
public GetAllMediaLibraryFieldType build() {
return new GetAllMediaLibraryFieldType(
type,
operator);
}
}
}

View File

@@ -0,0 +1,260 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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.Boolean;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryFilter {
@JsonProperty("filter")
private String filter;
@JsonProperty("filterType")
private String filterType;
@JsonProperty("key")
private String key;
@JsonProperty("title")
private String title;
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("advanced")
private Optional<Boolean> advanced;
@JsonCreator
public GetAllMediaLibraryFilter(
@JsonProperty("filter") String filter,
@JsonProperty("filterType") String filterType,
@JsonProperty("key") String key,
@JsonProperty("title") String title,
@JsonProperty("type") String type,
@JsonProperty("advanced") Optional<Boolean> advanced) {
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(filterType, "filterType");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(advanced, "advanced");
this.filter = filter;
this.filterType = filterType;
this.key = key;
this.title = title;
this.type = type;
this.advanced = advanced;
}
public GetAllMediaLibraryFilter(
String filter,
String filterType,
String key,
String title,
String type) {
this(filter, filterType, key, title, type, Optional.empty());
}
@JsonIgnore
public String filter() {
return filter;
}
@JsonIgnore
public String filterType() {
return filterType;
}
@JsonIgnore
public String key() {
return key;
}
@JsonIgnore
public String title() {
return title;
}
@JsonIgnore
public String type() {
return type;
}
@JsonIgnore
public Optional<Boolean> advanced() {
return advanced;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryFilter withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
public GetAllMediaLibraryFilter withFilterType(String filterType) {
Utils.checkNotNull(filterType, "filterType");
this.filterType = filterType;
return this;
}
public GetAllMediaLibraryFilter withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllMediaLibraryFilter withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllMediaLibraryFilter withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllMediaLibraryFilter withAdvanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public GetAllMediaLibraryFilter withAdvanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryFilter other = (GetAllMediaLibraryFilter) o;
return
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.filterType, other.filterType) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.advanced, other.advanced);
}
@Override
public int hashCode() {
return Objects.hash(
filter,
filterType,
key,
title,
type,
advanced);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryFilter.class,
"filter", filter,
"filterType", filterType,
"key", key,
"title", title,
"type", type,
"advanced", advanced);
}
public final static class Builder {
private String filter;
private String filterType;
private String key;
private String title;
private String type;
private Optional<Boolean> advanced = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
public Builder filterType(String filterType) {
Utils.checkNotNull(filterType, "filterType");
this.filterType = filterType;
return this;
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder advanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public Builder advanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
public GetAllMediaLibraryFilter build() {
return new GetAllMediaLibraryFilter(
filter,
filterType,
key,
title,
type,
advanced);
}
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryGenre {
/**
* The country of origin of this media item
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetAllMediaLibraryGenre(
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
/**
* The country of origin of this media item
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The country of origin of this media item
*/
public GetAllMediaLibraryGenre withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryGenre other = (GetAllMediaLibraryGenre) o;
return
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryGenre.class,
"tag", tag);
}
public final static class Builder {
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The country of origin of this media item
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetAllMediaLibraryGenre build() {
return new GetAllMediaLibraryGenre(
tag);
}
}
}

View File

@@ -0,0 +1,38 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryHasThumbnail - Indicates if the part has a thumbnail.
*/
public enum GetAllMediaLibraryHasThumbnail {
False("0"),
True("1");
@JsonValue
private final String value;
private GetAllMediaLibraryHasThumbnail(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetAllMediaLibraryHasThumbnail> fromValue(String value) {
for (GetAllMediaLibraryHasThumbnail o: GetAllMediaLibraryHasThumbnail.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,147 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryImage {
@JsonProperty("alt")
private String alt;
@JsonProperty("type")
private GetAllMediaLibraryLibraryResponseType type;
@JsonProperty("url")
private String url;
@JsonCreator
public GetAllMediaLibraryImage(
@JsonProperty("alt") String alt,
@JsonProperty("type") GetAllMediaLibraryLibraryResponseType type,
@JsonProperty("url") String url) {
Utils.checkNotNull(alt, "alt");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(url, "url");
this.alt = alt;
this.type = type;
this.url = url;
}
@JsonIgnore
public String alt() {
return alt;
}
@JsonIgnore
public GetAllMediaLibraryLibraryResponseType type() {
return type;
}
@JsonIgnore
public String url() {
return url;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryImage withAlt(String alt) {
Utils.checkNotNull(alt, "alt");
this.alt = alt;
return this;
}
public GetAllMediaLibraryImage withType(GetAllMediaLibraryLibraryResponseType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllMediaLibraryImage withUrl(String url) {
Utils.checkNotNull(url, "url");
this.url = url;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryImage other = (GetAllMediaLibraryImage) o;
return
Objects.deepEquals(this.alt, other.alt) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.url, other.url);
}
@Override
public int hashCode() {
return Objects.hash(
alt,
type,
url);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryImage.class,
"alt", alt,
"type", type,
"url", url);
}
public final static class Builder {
private String alt;
private GetAllMediaLibraryLibraryResponseType type;
private String url;
private Builder() {
// force use of static builder() method
}
public Builder alt(String alt) {
Utils.checkNotNull(alt, "alt");
this.alt = alt;
return this;
}
public Builder type(GetAllMediaLibraryLibraryResponseType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder url(String url) {
Utils.checkNotNull(url, "url");
this.url = url;
return this;
}
public GetAllMediaLibraryImage build() {
return new GetAllMediaLibraryImage(
alt,
type,
url);
}
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import dev.plexapi.sdk.utils.OneOfDeserializer;
import dev.plexapi.sdk.utils.TypedObject;
import dev.plexapi.sdk.utils.Utils.JsonShape;
import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
/**
* GetAllMediaLibraryLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonDeserialize(using = GetAllMediaLibraryLibraryOptimizedForStreaming._Deserializer.class)
public class GetAllMediaLibraryLibraryOptimizedForStreaming {
@JsonValue
private TypedObject value;
private GetAllMediaLibraryLibraryOptimizedForStreaming(TypedObject value) {
this.value = value;
}
public static GetAllMediaLibraryLibraryOptimizedForStreaming of(GetAllMediaLibraryOptimizedForStreaming1 value) {
Utils.checkNotNull(value, "value");
return new GetAllMediaLibraryLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetAllMediaLibraryOptimizedForStreaming1>(){}));
}
public static GetAllMediaLibraryLibraryOptimizedForStreaming of(boolean value) {
Utils.checkNotNull(value, "value");
return new GetAllMediaLibraryLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
}
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.GetAllMediaLibraryOptimizedForStreaming1}</li>
* <li>{@code boolean}</li>
* </ul>
*
* <p>Use {@code instanceof} to determine what type is returned. For example:
*
* <pre>
* if (obj.value() instanceof String) {
* String answer = (String) obj.value();
* System.out.println("answer=" + answer);
* }
* </pre>
*
* @return value of oneOf type
**/
public java.lang.Object value() {
return value.value();
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryLibraryOptimizedForStreaming other = (GetAllMediaLibraryLibraryOptimizedForStreaming) o;
return Objects.deepEquals(this.value.value(), other.value.value());
}
@Override
public int hashCode() {
return Objects.hash(value.value());
}
@SuppressWarnings("serial")
public static final class _Deserializer extends OneOfDeserializer<GetAllMediaLibraryLibraryOptimizedForStreaming> {
public _Deserializer() {
super(GetAllMediaLibraryLibraryOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<GetAllMediaLibraryOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryLibraryOptimizedForStreaming.class,
"value", value);
}
}

View File

@@ -0,0 +1,37 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public enum GetAllMediaLibraryLibraryResponseType {
COVER_POSTER("coverPoster"),
BACKGROUND("background"),
SNAPSHOT("snapshot"),
CLEAR_LOGO("clearLogo");
@JsonValue
private final String value;
private GetAllMediaLibraryLibraryResponseType(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetAllMediaLibraryLibraryResponseType> fromValue(String value) {
for (GetAllMediaLibraryLibraryResponseType o: GetAllMediaLibraryLibraryResponseType.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,43 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryLibraryType - The type of media content
*
*/
public enum GetAllMediaLibraryLibraryType {
Movie("movie"),
TvShow("show"),
Season("season"),
Episode("episode"),
Artist("artist"),
Album("album");
@JsonValue
private final String value;
private GetAllMediaLibraryLibraryType(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetAllMediaLibraryLibraryType> fromValue(String value) {
for (GetAllMediaLibraryLibraryType o: GetAllMediaLibraryLibraryType.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,932 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryMediaContainer {
/**
* Number of media items returned in this response.
*/
@JsonProperty("size")
private int size;
/**
* Total number of media items in the library.
*/
@JsonProperty("totalSize")
private int totalSize;
/**
* Offset value for pagination.
*/
@JsonProperty("offset")
private long offset;
/**
* Indicates whether syncing is allowed.
*/
@JsonProperty("allowSync")
private boolean allowSync;
/**
* URL for the background artwork of the media container.
*/
@JsonProperty("art")
private String art;
/**
* The content type or mode.
*/
@JsonProperty("content")
private String content;
/**
* An plugin identifier for the media container.
*/
@JsonProperty("identifier")
private String identifier;
/**
* The unique identifier for the library section.
*/
@JsonProperty("librarySectionID")
private long librarySectionID;
/**
* The title of the library section.
*/
@JsonProperty("librarySectionTitle")
private String librarySectionTitle;
/**
* The universally unique identifier for the library section.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("librarySectionUUID")
private Optional<String> librarySectionUUID;
/**
* The prefix used for media tag resource paths.
*/
@JsonProperty("mediaTagPrefix")
private String mediaTagPrefix;
/**
* The version number for media tags.
*/
@JsonProperty("mediaTagVersion")
private long mediaTagVersion;
/**
* URL for the thumbnail image of the media container.
*/
@JsonProperty("thumb")
private String thumb;
/**
* Specifies whether caching is disabled.
*/
@JsonProperty("nocache")
private boolean nocache;
/**
* The primary title of the media container.
*/
@JsonProperty("title1")
private String title1;
/**
* The secondary title of the media container.
*/
@JsonProperty("title2")
private String title2;
/**
* Identifier for the view group layout.
*/
@JsonProperty("viewGroup")
private String viewGroup;
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Meta")
private Optional<? extends GetAllMediaLibraryMeta> meta;
/**
* An array of metadata items.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Metadata")
private Optional<? extends List<GetAllMediaLibraryMetadata>> metadata;
@JsonCreator
public GetAllMediaLibraryMediaContainer(
@JsonProperty("size") int size,
@JsonProperty("totalSize") int totalSize,
@JsonProperty("offset") long offset,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("content") String content,
@JsonProperty("identifier") String identifier,
@JsonProperty("librarySectionID") long librarySectionID,
@JsonProperty("librarySectionTitle") String librarySectionTitle,
@JsonProperty("librarySectionUUID") Optional<String> librarySectionUUID,
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
@JsonProperty("mediaTagVersion") long mediaTagVersion,
@JsonProperty("thumb") String thumb,
@JsonProperty("nocache") boolean nocache,
@JsonProperty("title1") String title1,
@JsonProperty("title2") String title2,
@JsonProperty("viewGroup") String viewGroup,
@JsonProperty("Meta") Optional<? extends GetAllMediaLibraryMeta> meta,
@JsonProperty("Metadata") Optional<? extends List<GetAllMediaLibraryMetadata>> metadata) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(totalSize, "totalSize");
Utils.checkNotNull(offset, "offset");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(art, "art");
Utils.checkNotNull(content, "content");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(librarySectionID, "librarySectionID");
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
Utils.checkNotNull(thumb, "thumb");
Utils.checkNotNull(nocache, "nocache");
Utils.checkNotNull(title1, "title1");
Utils.checkNotNull(title2, "title2");
Utils.checkNotNull(viewGroup, "viewGroup");
Utils.checkNotNull(meta, "meta");
Utils.checkNotNull(metadata, "metadata");
this.size = size;
this.totalSize = totalSize;
this.offset = offset;
this.allowSync = allowSync;
this.art = art;
this.content = content;
this.identifier = identifier;
this.librarySectionID = librarySectionID;
this.librarySectionTitle = librarySectionTitle;
this.librarySectionUUID = librarySectionUUID;
this.mediaTagPrefix = mediaTagPrefix;
this.mediaTagVersion = mediaTagVersion;
this.thumb = thumb;
this.nocache = nocache;
this.title1 = title1;
this.title2 = title2;
this.viewGroup = viewGroup;
this.meta = meta;
this.metadata = metadata;
}
public GetAllMediaLibraryMediaContainer(
int size,
int totalSize,
long offset,
boolean allowSync,
String art,
String content,
String identifier,
long librarySectionID,
String librarySectionTitle,
String mediaTagPrefix,
long mediaTagVersion,
String thumb,
boolean nocache,
String title1,
String title2,
String viewGroup) {
this(size, totalSize, offset, allowSync, art, content, identifier, librarySectionID, librarySectionTitle, Optional.empty(), mediaTagPrefix, mediaTagVersion, thumb, nocache, title1, title2, viewGroup, Optional.empty(), Optional.empty());
}
/**
* Number of media items returned in this response.
*/
@JsonIgnore
public int size() {
return size;
}
/**
* Total number of media items in the library.
*/
@JsonIgnore
public int totalSize() {
return totalSize;
}
/**
* Offset value for pagination.
*/
@JsonIgnore
public long offset() {
return offset;
}
/**
* Indicates whether syncing is allowed.
*/
@JsonIgnore
public boolean allowSync() {
return allowSync;
}
/**
* URL for the background artwork of the media container.
*/
@JsonIgnore
public String art() {
return art;
}
/**
* The content type or mode.
*/
@JsonIgnore
public String content() {
return content;
}
/**
* An plugin identifier for the media container.
*/
@JsonIgnore
public String identifier() {
return identifier;
}
/**
* The unique identifier for the library section.
*/
@JsonIgnore
public long librarySectionID() {
return librarySectionID;
}
/**
* The title of the library section.
*/
@JsonIgnore
public String librarySectionTitle() {
return librarySectionTitle;
}
/**
* The universally unique identifier for the library section.
*/
@JsonIgnore
public Optional<String> librarySectionUUID() {
return librarySectionUUID;
}
/**
* The prefix used for media tag resource paths.
*/
@JsonIgnore
public String mediaTagPrefix() {
return mediaTagPrefix;
}
/**
* The version number for media tags.
*/
@JsonIgnore
public long mediaTagVersion() {
return mediaTagVersion;
}
/**
* URL for the thumbnail image of the media container.
*/
@JsonIgnore
public String thumb() {
return thumb;
}
/**
* Specifies whether caching is disabled.
*/
@JsonIgnore
public boolean nocache() {
return nocache;
}
/**
* The primary title of the media container.
*/
@JsonIgnore
public String title1() {
return title1;
}
/**
* The secondary title of the media container.
*/
@JsonIgnore
public String title2() {
return title2;
}
/**
* Identifier for the view group layout.
*/
@JsonIgnore
public String viewGroup() {
return viewGroup;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryMeta> meta() {
return (Optional<GetAllMediaLibraryMeta>) meta;
}
/**
* An array of metadata items.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibraryMetadata>> metadata() {
return (Optional<List<GetAllMediaLibraryMetadata>>) metadata;
}
public final static Builder builder() {
return new Builder();
}
/**
* Number of media items returned in this response.
*/
public GetAllMediaLibraryMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
/**
* Total number of media items in the library.
*/
public GetAllMediaLibraryMediaContainer withTotalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
/**
* Offset value for pagination.
*/
public GetAllMediaLibraryMediaContainer withOffset(long offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public GetAllMediaLibraryMediaContainer withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
/**
* URL for the background artwork of the media container.
*/
public GetAllMediaLibraryMediaContainer withArt(String art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
/**
* The content type or mode.
*/
public GetAllMediaLibraryMediaContainer withContent(String content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
/**
* An plugin identifier for the media container.
*/
public GetAllMediaLibraryMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* The unique identifier for the library section.
*/
public GetAllMediaLibraryMediaContainer withLibrarySectionID(long librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = librarySectionID;
return this;
}
/**
* The title of the library section.
*/
public GetAllMediaLibraryMediaContainer withLibrarySectionTitle(String librarySectionTitle) {
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
this.librarySectionTitle = librarySectionTitle;
return this;
}
/**
* The universally unique identifier for the library section.
*/
public GetAllMediaLibraryMediaContainer withLibrarySectionUUID(String librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
return this;
}
/**
* The universally unique identifier for the library section.
*/
public GetAllMediaLibraryMediaContainer withLibrarySectionUUID(Optional<String> librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = librarySectionUUID;
return this;
}
/**
* The prefix used for media tag resource paths.
*/
public GetAllMediaLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
/**
* The version number for media tags.
*/
public GetAllMediaLibraryMediaContainer withMediaTagVersion(long mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
/**
* URL for the thumbnail image of the media container.
*/
public GetAllMediaLibraryMediaContainer withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* Specifies whether caching is disabled.
*/
public GetAllMediaLibraryMediaContainer withNocache(boolean nocache) {
Utils.checkNotNull(nocache, "nocache");
this.nocache = nocache;
return this;
}
/**
* The primary title of the media container.
*/
public GetAllMediaLibraryMediaContainer withTitle1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
/**
* The secondary title of the media container.
*/
public GetAllMediaLibraryMediaContainer withTitle2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
/**
* Identifier for the view group layout.
*/
public GetAllMediaLibraryMediaContainer withViewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public GetAllMediaLibraryMediaContainer withMeta(GetAllMediaLibraryMeta meta) {
Utils.checkNotNull(meta, "meta");
this.meta = Optional.ofNullable(meta);
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public GetAllMediaLibraryMediaContainer withMeta(Optional<? extends GetAllMediaLibraryMeta> meta) {
Utils.checkNotNull(meta, "meta");
this.meta = meta;
return this;
}
/**
* An array of metadata items.
*/
public GetAllMediaLibraryMediaContainer withMetadata(List<GetAllMediaLibraryMetadata> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = Optional.ofNullable(metadata);
return this;
}
/**
* An array of metadata items.
*/
public GetAllMediaLibraryMediaContainer withMetadata(Optional<? extends List<GetAllMediaLibraryMetadata>> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = metadata;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryMediaContainer other = (GetAllMediaLibraryMediaContainer) o;
return
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.totalSize, other.totalSize) &&
Objects.deepEquals(this.offset, other.offset) &&
Objects.deepEquals(this.allowSync, other.allowSync) &&
Objects.deepEquals(this.art, other.art) &&
Objects.deepEquals(this.content, other.content) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.librarySectionID, other.librarySectionID) &&
Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) &&
Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) &&
Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) &&
Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) &&
Objects.deepEquals(this.thumb, other.thumb) &&
Objects.deepEquals(this.nocache, other.nocache) &&
Objects.deepEquals(this.title1, other.title1) &&
Objects.deepEquals(this.title2, other.title2) &&
Objects.deepEquals(this.viewGroup, other.viewGroup) &&
Objects.deepEquals(this.meta, other.meta) &&
Objects.deepEquals(this.metadata, other.metadata);
}
@Override
public int hashCode() {
return Objects.hash(
size,
totalSize,
offset,
allowSync,
art,
content,
identifier,
librarySectionID,
librarySectionTitle,
librarySectionUUID,
mediaTagPrefix,
mediaTagVersion,
thumb,
nocache,
title1,
title2,
viewGroup,
meta,
metadata);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryMediaContainer.class,
"size", size,
"totalSize", totalSize,
"offset", offset,
"allowSync", allowSync,
"art", art,
"content", content,
"identifier", identifier,
"librarySectionID", librarySectionID,
"librarySectionTitle", librarySectionTitle,
"librarySectionUUID", librarySectionUUID,
"mediaTagPrefix", mediaTagPrefix,
"mediaTagVersion", mediaTagVersion,
"thumb", thumb,
"nocache", nocache,
"title1", title1,
"title2", title2,
"viewGroup", viewGroup,
"meta", meta,
"metadata", metadata);
}
public final static class Builder {
private Integer size;
private Integer totalSize;
private Long offset;
private Boolean allowSync;
private String art;
private String content;
private String identifier;
private Long librarySectionID;
private String librarySectionTitle;
private Optional<String> librarySectionUUID = Optional.empty();
private String mediaTagPrefix;
private Long mediaTagVersion;
private String thumb;
private Boolean nocache;
private String title1;
private String title2;
private String viewGroup;
private Optional<? extends GetAllMediaLibraryMeta> meta = Optional.empty();
private Optional<? extends List<GetAllMediaLibraryMetadata>> metadata = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* Number of media items returned in this response.
*/
public Builder size(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
/**
* Total number of media items in the library.
*/
public Builder totalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
/**
* Offset value for pagination.
*/
public Builder offset(long offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
/**
* URL for the background artwork of the media container.
*/
public Builder art(String art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
/**
* The content type or mode.
*/
public Builder content(String content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
/**
* An plugin identifier for the media container.
*/
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* The unique identifier for the library section.
*/
public Builder librarySectionID(long librarySectionID) {
Utils.checkNotNull(librarySectionID, "librarySectionID");
this.librarySectionID = librarySectionID;
return this;
}
/**
* The title of the library section.
*/
public Builder librarySectionTitle(String librarySectionTitle) {
Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
this.librarySectionTitle = librarySectionTitle;
return this;
}
/**
* The universally unique identifier for the library section.
*/
public Builder librarySectionUUID(String librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
return this;
}
/**
* The universally unique identifier for the library section.
*/
public Builder librarySectionUUID(Optional<String> librarySectionUUID) {
Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
this.librarySectionUUID = librarySectionUUID;
return this;
}
/**
* The prefix used for media tag resource paths.
*/
public Builder mediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
/**
* The version number for media tags.
*/
public Builder mediaTagVersion(long mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
/**
* URL for the thumbnail image of the media container.
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* Specifies whether caching is disabled.
*/
public Builder nocache(boolean nocache) {
Utils.checkNotNull(nocache, "nocache");
this.nocache = nocache;
return this;
}
/**
* The primary title of the media container.
*/
public Builder title1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
/**
* The secondary title of the media container.
*/
public Builder title2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
/**
* Identifier for the view group layout.
*/
public Builder viewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public Builder meta(GetAllMediaLibraryMeta meta) {
Utils.checkNotNull(meta, "meta");
this.meta = Optional.ofNullable(meta);
return this;
}
/**
* The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public Builder meta(Optional<? extends GetAllMediaLibraryMeta> meta) {
Utils.checkNotNull(meta, "meta");
this.meta = meta;
return this;
}
/**
* An array of metadata items.
*/
public Builder metadata(List<GetAllMediaLibraryMetadata> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = Optional.ofNullable(metadata);
return this;
}
/**
* An array of metadata items.
*/
public Builder metadata(Optional<? extends List<GetAllMediaLibraryMetadata>> metadata) {
Utils.checkNotNull(metadata, "metadata");
this.metadata = metadata;
return this;
}
public GetAllMediaLibraryMediaContainer build() {
return new GetAllMediaLibraryMediaContainer(
size,
totalSize,
offset,
allowSync,
art,
content,
identifier,
librarySectionID,
librarySectionTitle,
librarySectionUUID,
mediaTagPrefix,
mediaTagVersion,
thumb,
nocache,
title1,
title2,
viewGroup,
meta,
metadata);
}
}
}

View File

@@ -0,0 +1,159 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryMeta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
*
*/
public class GetAllMediaLibraryMeta {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Type")
private Optional<? extends List<GetAllMediaLibraryType>> type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("FieldType")
private Optional<? extends List<GetAllMediaLibraryFieldType>> fieldType;
@JsonCreator
public GetAllMediaLibraryMeta(
@JsonProperty("Type") Optional<? extends List<GetAllMediaLibraryType>> type,
@JsonProperty("FieldType") Optional<? extends List<GetAllMediaLibraryFieldType>> fieldType) {
Utils.checkNotNull(type, "type");
Utils.checkNotNull(fieldType, "fieldType");
this.type = type;
this.fieldType = fieldType;
}
public GetAllMediaLibraryMeta() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibraryType>> type() {
return (Optional<List<GetAllMediaLibraryType>>) type;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibraryFieldType>> fieldType() {
return (Optional<List<GetAllMediaLibraryFieldType>>) fieldType;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryMeta withType(List<GetAllMediaLibraryType> type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public GetAllMediaLibraryMeta withType(Optional<? extends List<GetAllMediaLibraryType>> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllMediaLibraryMeta withFieldType(List<GetAllMediaLibraryFieldType> fieldType) {
Utils.checkNotNull(fieldType, "fieldType");
this.fieldType = Optional.ofNullable(fieldType);
return this;
}
public GetAllMediaLibraryMeta withFieldType(Optional<? extends List<GetAllMediaLibraryFieldType>> fieldType) {
Utils.checkNotNull(fieldType, "fieldType");
this.fieldType = fieldType;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryMeta other = (GetAllMediaLibraryMeta) o;
return
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.fieldType, other.fieldType);
}
@Override
public int hashCode() {
return Objects.hash(
type,
fieldType);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryMeta.class,
"type", type,
"fieldType", fieldType);
}
public final static class Builder {
private Optional<? extends List<GetAllMediaLibraryType>> type = Optional.empty();
private Optional<? extends List<GetAllMediaLibraryFieldType>> fieldType = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder type(List<GetAllMediaLibraryType> type) {
Utils.checkNotNull(type, "type");
this.type = Optional.ofNullable(type);
return this;
}
public Builder type(Optional<? extends List<GetAllMediaLibraryType>> type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder fieldType(List<GetAllMediaLibraryFieldType> fieldType) {
Utils.checkNotNull(fieldType, "fieldType");
this.fieldType = Optional.ofNullable(fieldType);
return this;
}
public Builder fieldType(Optional<? extends List<GetAllMediaLibraryFieldType>> fieldType) {
Utils.checkNotNull(fieldType, "fieldType");
this.fieldType = fieldType;
return this;
}
public GetAllMediaLibraryMeta build() {
return new GetAllMediaLibraryMeta(
type,
fieldType);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,118 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryOperator {
@JsonProperty("key")
private String key;
@JsonProperty("title")
private String title;
@JsonCreator
public GetAllMediaLibraryOperator(
@JsonProperty("key") String key,
@JsonProperty("title") String title) {
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
this.key = key;
this.title = title;
}
@JsonIgnore
public String key() {
return key;
}
@JsonIgnore
public String title() {
return title;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryOperator withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllMediaLibraryOperator withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryOperator other = (GetAllMediaLibraryOperator) o;
return
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title);
}
@Override
public int hashCode() {
return Objects.hash(
key,
title);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryOperator.class,
"key", key,
"title", title);
}
public final static class Builder {
private String key;
private String title;
private Builder() {
// force use of static builder() method
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllMediaLibraryOperator build() {
return new GetAllMediaLibraryOperator(
key,
title);
}
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import dev.plexapi.sdk.utils.OneOfDeserializer;
import dev.plexapi.sdk.utils.TypedObject;
import dev.plexapi.sdk.utils.Utils.JsonShape;
import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
/**
* GetAllMediaLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonDeserialize(using = GetAllMediaLibraryOptimizedForStreaming._Deserializer.class)
public class GetAllMediaLibraryOptimizedForStreaming {
@JsonValue
private TypedObject value;
private GetAllMediaLibraryOptimizedForStreaming(TypedObject value) {
this.value = value;
}
public static GetAllMediaLibraryOptimizedForStreaming of(One value) {
Utils.checkNotNull(value, "value");
return new GetAllMediaLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<One>(){}));
}
public static GetAllMediaLibraryOptimizedForStreaming of(boolean value) {
Utils.checkNotNull(value, "value");
return new GetAllMediaLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
}
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.One}</li>
* <li>{@code boolean}</li>
* </ul>
*
* <p>Use {@code instanceof} to determine what type is returned. For example:
*
* <pre>
* if (obj.value() instanceof String) {
* String answer = (String) obj.value();
* System.out.println("answer=" + answer);
* }
* </pre>
*
* @return value of oneOf type
**/
public java.lang.Object value() {
return value.value();
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryOptimizedForStreaming other = (GetAllMediaLibraryOptimizedForStreaming) o;
return Objects.deepEquals(this.value.value(), other.value.value());
}
@Override
public int hashCode() {
return Objects.hash(value.value());
}
@SuppressWarnings("serial")
public static final class _Deserializer extends OneOfDeserializer<GetAllMediaLibraryOptimizedForStreaming> {
public _Deserializer() {
super(GetAllMediaLibraryOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<One>() {}, JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryOptimizedForStreaming.class,
"value", value);
}
}

View File

@@ -0,0 +1,34 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
public enum GetAllMediaLibraryOptimizedForStreaming1 {
ZERO(0),
ONE(1);
@JsonValue
private final int value;
private GetAllMediaLibraryOptimizedForStreaming1(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetAllMediaLibraryOptimizedForStreaming1> fromValue(int value) {
for (GetAllMediaLibraryOptimizedForStreaming1 o: GetAllMediaLibraryOptimizedForStreaming1.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,901 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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 com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryPart {
/**
* Indicates if the part is accessible.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("accessible")
private Optional<Boolean> accessible;
/**
* Indicates if the part exists.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("exists")
private Optional<Boolean> exists;
/**
* Unique part identifier.
*/
@JsonProperty("id")
private long id;
/**
* Key to access this part.
*/
@JsonProperty("key")
private String key;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("indexes")
private Optional<String> indexes;
/**
* Duration of the part in milliseconds.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("duration")
private Optional<Integer> duration;
/**
* File path for the part.
*/
@JsonProperty("file")
private String file;
/**
* File size in bytes.
*/
@JsonProperty("size")
private long size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("packetLength")
private Optional<Integer> packetLength;
/**
* Container format of the part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("container")
private Optional<String> container;
/**
* Video profile for the part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoProfile")
private Optional<String> videoProfile;
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audioProfile")
private Optional<String> audioProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("has64bitOffsets")
private Optional<Boolean> has64bitOffsets;
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("optimizedForStreaming")
private Optional<? extends GetAllMediaLibraryLibraryOptimizedForStreaming> optimizedForStreaming;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hasThumbnail")
private Optional<? extends GetAllMediaLibraryHasThumbnail> hasThumbnail;
/**
* An array of streams for this part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Stream")
private Optional<? extends List<GetAllMediaLibraryStream>> stream;
@JsonCreator
public GetAllMediaLibraryPart(
@JsonProperty("accessible") Optional<Boolean> accessible,
@JsonProperty("exists") Optional<Boolean> exists,
@JsonProperty("id") long id,
@JsonProperty("key") String key,
@JsonProperty("indexes") Optional<String> indexes,
@JsonProperty("duration") Optional<Integer> duration,
@JsonProperty("file") String file,
@JsonProperty("size") long size,
@JsonProperty("packetLength") Optional<Integer> packetLength,
@JsonProperty("container") Optional<String> container,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("audioProfile") Optional<String> audioProfile,
@JsonProperty("has64bitOffsets") Optional<Boolean> has64bitOffsets,
@JsonProperty("optimizedForStreaming") Optional<? extends GetAllMediaLibraryLibraryOptimizedForStreaming> optimizedForStreaming,
@JsonProperty("hasThumbnail") Optional<? extends GetAllMediaLibraryHasThumbnail> hasThumbnail,
@JsonProperty("Stream") Optional<? extends List<GetAllMediaLibraryStream>> stream) {
Utils.checkNotNull(accessible, "accessible");
Utils.checkNotNull(exists, "exists");
Utils.checkNotNull(id, "id");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(indexes, "indexes");
Utils.checkNotNull(duration, "duration");
Utils.checkNotNull(file, "file");
Utils.checkNotNull(size, "size");
Utils.checkNotNull(packetLength, "packetLength");
Utils.checkNotNull(container, "container");
Utils.checkNotNull(videoProfile, "videoProfile");
Utils.checkNotNull(audioProfile, "audioProfile");
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
Utils.checkNotNull(stream, "stream");
this.accessible = accessible;
this.exists = exists;
this.id = id;
this.key = key;
this.indexes = indexes;
this.duration = duration;
this.file = file;
this.size = size;
this.packetLength = packetLength;
this.container = container;
this.videoProfile = videoProfile;
this.audioProfile = audioProfile;
this.has64bitOffsets = has64bitOffsets;
this.optimizedForStreaming = optimizedForStreaming;
this.hasThumbnail = hasThumbnail;
this.stream = stream;
}
public GetAllMediaLibraryPart(
long id,
String key,
String file,
long size) {
this(Optional.empty(), Optional.empty(), id, key, Optional.empty(), Optional.empty(), file, size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
* Indicates if the part is accessible.
*/
@JsonIgnore
public Optional<Boolean> accessible() {
return accessible;
}
/**
* Indicates if the part exists.
*/
@JsonIgnore
public Optional<Boolean> exists() {
return exists;
}
/**
* Unique part identifier.
*/
@JsonIgnore
public long id() {
return id;
}
/**
* Key to access this part.
*/
@JsonIgnore
public String key() {
return key;
}
@JsonIgnore
public Optional<String> indexes() {
return indexes;
}
/**
* Duration of the part in milliseconds.
*/
@JsonIgnore
public Optional<Integer> duration() {
return duration;
}
/**
* File path for the part.
*/
@JsonIgnore
public String file() {
return file;
}
/**
* File size in bytes.
*/
@JsonIgnore
public long size() {
return size;
}
@JsonIgnore
public Optional<Integer> packetLength() {
return packetLength;
}
/**
* Container format of the part.
*/
@JsonIgnore
public Optional<String> container() {
return container;
}
/**
* Video profile for the part.
*/
@JsonIgnore
public Optional<String> videoProfile() {
return videoProfile;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
@JsonIgnore
public Optional<String> audioProfile() {
return audioProfile;
}
@JsonIgnore
public Optional<Boolean> has64bitOffsets() {
return has64bitOffsets;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryLibraryOptimizedForStreaming> optimizedForStreaming() {
return (Optional<GetAllMediaLibraryLibraryOptimizedForStreaming>) optimizedForStreaming;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryHasThumbnail> hasThumbnail() {
return (Optional<GetAllMediaLibraryHasThumbnail>) hasThumbnail;
}
/**
* An array of streams for this part.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibraryStream>> stream() {
return (Optional<List<GetAllMediaLibraryStream>>) stream;
}
public final static Builder builder() {
return new Builder();
}
/**
* Indicates if the part is accessible.
*/
public GetAllMediaLibraryPart withAccessible(boolean accessible) {
Utils.checkNotNull(accessible, "accessible");
this.accessible = Optional.ofNullable(accessible);
return this;
}
/**
* Indicates if the part is accessible.
*/
public GetAllMediaLibraryPart withAccessible(Optional<Boolean> accessible) {
Utils.checkNotNull(accessible, "accessible");
this.accessible = accessible;
return this;
}
/**
* Indicates if the part exists.
*/
public GetAllMediaLibraryPart withExists(boolean exists) {
Utils.checkNotNull(exists, "exists");
this.exists = Optional.ofNullable(exists);
return this;
}
/**
* Indicates if the part exists.
*/
public GetAllMediaLibraryPart withExists(Optional<Boolean> exists) {
Utils.checkNotNull(exists, "exists");
this.exists = exists;
return this;
}
/**
* Unique part identifier.
*/
public GetAllMediaLibraryPart withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* Key to access this part.
*/
public GetAllMediaLibraryPart withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllMediaLibraryPart withIndexes(String indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = Optional.ofNullable(indexes);
return this;
}
public GetAllMediaLibraryPart withIndexes(Optional<String> indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = indexes;
return this;
}
/**
* Duration of the part in milliseconds.
*/
public GetAllMediaLibraryPart withDuration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
/**
* Duration of the part in milliseconds.
*/
public GetAllMediaLibraryPart withDuration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
/**
* File path for the part.
*/
public GetAllMediaLibraryPart withFile(String file) {
Utils.checkNotNull(file, "file");
this.file = file;
return this;
}
/**
* File size in bytes.
*/
public GetAllMediaLibraryPart withSize(long size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetAllMediaLibraryPart withPacketLength(int packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = Optional.ofNullable(packetLength);
return this;
}
public GetAllMediaLibraryPart withPacketLength(Optional<Integer> packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = packetLength;
return this;
}
/**
* Container format of the part.
*/
public GetAllMediaLibraryPart withContainer(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
/**
* Container format of the part.
*/
public GetAllMediaLibraryPart withContainer(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
/**
* Video profile for the part.
*/
public GetAllMediaLibraryPart withVideoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
/**
* Video profile for the part.
*/
public GetAllMediaLibraryPart withVideoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public GetAllMediaLibraryPart withAudioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public GetAllMediaLibraryPart withAudioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public GetAllMediaLibraryPart withHas64bitOffsets(boolean has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = Optional.ofNullable(has64bitOffsets);
return this;
}
public GetAllMediaLibraryPart withHas64bitOffsets(Optional<Boolean> has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = has64bitOffsets;
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public GetAllMediaLibraryPart withOptimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreaming optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public GetAllMediaLibraryPart withOptimizedForStreaming(Optional<? extends GetAllMediaLibraryLibraryOptimizedForStreaming> optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = optimizedForStreaming;
return this;
}
public GetAllMediaLibraryPart withHasThumbnail(GetAllMediaLibraryHasThumbnail hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
return this;
}
public GetAllMediaLibraryPart withHasThumbnail(Optional<? extends GetAllMediaLibraryHasThumbnail> hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = hasThumbnail;
return this;
}
/**
* An array of streams for this part.
*/
public GetAllMediaLibraryPart withStream(List<GetAllMediaLibraryStream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
/**
* An array of streams for this part.
*/
public GetAllMediaLibraryPart withStream(Optional<? extends List<GetAllMediaLibraryStream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryPart other = (GetAllMediaLibraryPart) o;
return
Objects.deepEquals(this.accessible, other.accessible) &&
Objects.deepEquals(this.exists, other.exists) &&
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.indexes, other.indexes) &&
Objects.deepEquals(this.duration, other.duration) &&
Objects.deepEquals(this.file, other.file) &&
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.packetLength, other.packetLength) &&
Objects.deepEquals(this.container, other.container) &&
Objects.deepEquals(this.videoProfile, other.videoProfile) &&
Objects.deepEquals(this.audioProfile, other.audioProfile) &&
Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) &&
Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) &&
Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) &&
Objects.deepEquals(this.stream, other.stream);
}
@Override
public int hashCode() {
return Objects.hash(
accessible,
exists,
id,
key,
indexes,
duration,
file,
size,
packetLength,
container,
videoProfile,
audioProfile,
has64bitOffsets,
optimizedForStreaming,
hasThumbnail,
stream);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryPart.class,
"accessible", accessible,
"exists", exists,
"id", id,
"key", key,
"indexes", indexes,
"duration", duration,
"file", file,
"size", size,
"packetLength", packetLength,
"container", container,
"videoProfile", videoProfile,
"audioProfile", audioProfile,
"has64bitOffsets", has64bitOffsets,
"optimizedForStreaming", optimizedForStreaming,
"hasThumbnail", hasThumbnail,
"stream", stream);
}
public final static class Builder {
private Optional<Boolean> accessible = Optional.empty();
private Optional<Boolean> exists = Optional.empty();
private Long id;
private String key;
private Optional<String> indexes = Optional.empty();
private Optional<Integer> duration = Optional.empty();
private String file;
private Long size;
private Optional<Integer> packetLength = Optional.empty();
private Optional<String> container = Optional.empty();
private Optional<String> videoProfile = Optional.empty();
private Optional<String> audioProfile = Optional.empty();
private Optional<Boolean> has64bitOffsets = Optional.empty();
private Optional<? extends GetAllMediaLibraryLibraryOptimizedForStreaming> optimizedForStreaming = Optional.empty();
private Optional<? extends GetAllMediaLibraryHasThumbnail> hasThumbnail;
private Optional<? extends List<GetAllMediaLibraryStream>> stream = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* Indicates if the part is accessible.
*/
public Builder accessible(boolean accessible) {
Utils.checkNotNull(accessible, "accessible");
this.accessible = Optional.ofNullable(accessible);
return this;
}
/**
* Indicates if the part is accessible.
*/
public Builder accessible(Optional<Boolean> accessible) {
Utils.checkNotNull(accessible, "accessible");
this.accessible = accessible;
return this;
}
/**
* Indicates if the part exists.
*/
public Builder exists(boolean exists) {
Utils.checkNotNull(exists, "exists");
this.exists = Optional.ofNullable(exists);
return this;
}
/**
* Indicates if the part exists.
*/
public Builder exists(Optional<Boolean> exists) {
Utils.checkNotNull(exists, "exists");
this.exists = exists;
return this;
}
/**
* Unique part identifier.
*/
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
/**
* Key to access this part.
*/
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder indexes(String indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = Optional.ofNullable(indexes);
return this;
}
public Builder indexes(Optional<String> indexes) {
Utils.checkNotNull(indexes, "indexes");
this.indexes = indexes;
return this;
}
/**
* Duration of the part in milliseconds.
*/
public Builder duration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
/**
* Duration of the part in milliseconds.
*/
public Builder duration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
}
/**
* File path for the part.
*/
public Builder file(String file) {
Utils.checkNotNull(file, "file");
this.file = file;
return this;
}
/**
* File size in bytes.
*/
public Builder size(long size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Builder packetLength(int packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = Optional.ofNullable(packetLength);
return this;
}
public Builder packetLength(Optional<Integer> packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = packetLength;
return this;
}
/**
* Container format of the part.
*/
public Builder container(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
/**
* Container format of the part.
*/
public Builder container(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
}
/**
* Video profile for the part.
*/
public Builder videoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
/**
* Video profile for the part.
*/
public Builder videoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public Builder audioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public Builder audioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public Builder has64bitOffsets(boolean has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = Optional.ofNullable(has64bitOffsets);
return this;
}
public Builder has64bitOffsets(Optional<Boolean> has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = has64bitOffsets;
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Builder optimizedForStreaming(GetAllMediaLibraryLibraryOptimizedForStreaming optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Builder optimizedForStreaming(Optional<? extends GetAllMediaLibraryLibraryOptimizedForStreaming> optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = optimizedForStreaming;
return this;
}
public Builder hasThumbnail(GetAllMediaLibraryHasThumbnail hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
return this;
}
public Builder hasThumbnail(Optional<? extends GetAllMediaLibraryHasThumbnail> hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = hasThumbnail;
return this;
}
/**
* An array of streams for this part.
*/
public Builder stream(List<GetAllMediaLibraryStream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
/**
* An array of streams for this part.
*/
public Builder stream(Optional<? extends List<GetAllMediaLibraryStream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
return this;
}
public GetAllMediaLibraryPart build() {
if (hasThumbnail == null) {
hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value();
} return new GetAllMediaLibraryPart(
accessible,
exists,
id,
key,
indexes,
duration,
file,
size,
packetLength,
container,
videoProfile,
audioProfile,
has64bitOffsets,
optimizedForStreaming,
hasThumbnail,
stream);
}
private static final LazySingletonValue<Optional<? extends GetAllMediaLibraryHasThumbnail>> _SINGLETON_VALUE_HasThumbnail =
new LazySingletonValue<>(
"hasThumbnail",
"\"0\"",
new TypeReference<Optional<? extends GetAllMediaLibraryHasThumbnail>>() {});
}
}

View File

@@ -0,0 +1,38 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryQueryParamIncludeMeta - Adds the Meta object to the response
*
*/
public enum GetAllMediaLibraryQueryParamIncludeMeta {
Disable(0),
Enable(1);
@JsonValue
private final int value;
private GetAllMediaLibraryQueryParamIncludeMeta(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetAllMediaLibraryQueryParamIncludeMeta> fromValue(int value) {
for (GetAllMediaLibraryQueryParamIncludeMeta o: GetAllMediaLibraryQueryParamIncludeMeta.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,48 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryQueryParamType - The type of media to retrieve or filter by.
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*
*/
public enum GetAllMediaLibraryQueryParamType {
Movie(1L),
TvShow(2L),
Season(3L),
Episode(4L),
Audio(8L),
Album(9L),
Track(10L);
@JsonValue
private final long value;
private GetAllMediaLibraryQueryParamType(long value) {
this.value = value;
}
public long value() {
return value;
}
public static Optional<GetAllMediaLibraryQueryParamType> fromValue(long value) {
for (GetAllMediaLibraryQueryParamType o: GetAllMediaLibraryQueryParamType.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,659 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.SpeakeasyMetadata;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryRequest {
/**
* The unique key of the Plex library.
* Note: This is unique in the context of the Plex server.
*
*/
@SpeakeasyMetadata("pathParam:style=simple,explode=false,name=sectionKey")
private int sectionKey;
/**
* The type of media to retrieve or filter by.
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=type")
private GetAllMediaLibraryQueryParamType type;
/**
* Adds the Meta object to the response
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeMeta")
private Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta> includeMeta;
/**
* Adds the Guid object to the response
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeGuids")
private Optional<? extends QueryParamIncludeGuids> includeGuids;
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeAdvanced")
private Optional<? extends IncludeAdvanced> includeAdvanced;
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections")
private Optional<? extends QueryParamIncludeCollections> includeCollections;
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia")
private Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia;
/**
* The index of the first item to return. If not specified, the first item will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 0
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Start")
private Optional<Integer> xPlexContainerStart;
/**
* The number of items to return. If not specified, all items will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 50
*
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Container-Size")
private Optional<Integer> xPlexContainerSize;
@JsonCreator
public GetAllMediaLibraryRequest(
int sectionKey,
GetAllMediaLibraryQueryParamType type,
Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta> includeMeta,
Optional<? extends QueryParamIncludeGuids> includeGuids,
Optional<? extends IncludeAdvanced> includeAdvanced,
Optional<? extends QueryParamIncludeCollections> includeCollections,
Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia,
Optional<Integer> xPlexContainerStart,
Optional<Integer> xPlexContainerSize) {
Utils.checkNotNull(sectionKey, "sectionKey");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(includeMeta, "includeMeta");
Utils.checkNotNull(includeGuids, "includeGuids");
Utils.checkNotNull(includeAdvanced, "includeAdvanced");
Utils.checkNotNull(includeCollections, "includeCollections");
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart");
Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize");
this.sectionKey = sectionKey;
this.type = type;
this.includeMeta = includeMeta;
this.includeGuids = includeGuids;
this.includeAdvanced = includeAdvanced;
this.includeCollections = includeCollections;
this.includeExternalMedia = includeExternalMedia;
this.xPlexContainerStart = xPlexContainerStart;
this.xPlexContainerSize = xPlexContainerSize;
}
public GetAllMediaLibraryRequest(
int sectionKey,
GetAllMediaLibraryQueryParamType type) {
this(sectionKey, type, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
* The unique key of the Plex library.
* Note: This is unique in the context of the Plex server.
*
*/
@JsonIgnore
public int sectionKey() {
return sectionKey;
}
/**
* The type of media to retrieve or filter by.
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*
*/
@JsonIgnore
public GetAllMediaLibraryQueryParamType type() {
return type;
}
/**
* Adds the Meta object to the response
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryQueryParamIncludeMeta> includeMeta() {
return (Optional<GetAllMediaLibraryQueryParamIncludeMeta>) includeMeta;
}
/**
* Adds the Guid object to the response
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<QueryParamIncludeGuids> includeGuids() {
return (Optional<QueryParamIncludeGuids>) includeGuids;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<IncludeAdvanced> includeAdvanced() {
return (Optional<IncludeAdvanced>) includeAdvanced;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<QueryParamIncludeCollections> includeCollections() {
return (Optional<QueryParamIncludeCollections>) includeCollections;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<QueryParamIncludeExternalMedia> includeExternalMedia() {
return (Optional<QueryParamIncludeExternalMedia>) includeExternalMedia;
}
/**
* The index of the first item to return. If not specified, the first item will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 0
*
*/
@JsonIgnore
public Optional<Integer> xPlexContainerStart() {
return xPlexContainerStart;
}
/**
* The number of items to return. If not specified, all items will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 50
*
*/
@JsonIgnore
public Optional<Integer> xPlexContainerSize() {
return xPlexContainerSize;
}
public final static Builder builder() {
return new Builder();
}
/**
* The unique key of the Plex library.
* Note: This is unique in the context of the Plex server.
*
*/
public GetAllMediaLibraryRequest withSectionKey(int sectionKey) {
Utils.checkNotNull(sectionKey, "sectionKey");
this.sectionKey = sectionKey;
return this;
}
/**
* The type of media to retrieve or filter by.
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*
*/
public GetAllMediaLibraryRequest withType(GetAllMediaLibraryQueryParamType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
/**
* Adds the Meta object to the response
*
*/
public GetAllMediaLibraryRequest withIncludeMeta(GetAllMediaLibraryQueryParamIncludeMeta includeMeta) {
Utils.checkNotNull(includeMeta, "includeMeta");
this.includeMeta = Optional.ofNullable(includeMeta);
return this;
}
/**
* Adds the Meta object to the response
*
*/
public GetAllMediaLibraryRequest withIncludeMeta(Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta> includeMeta) {
Utils.checkNotNull(includeMeta, "includeMeta");
this.includeMeta = includeMeta;
return this;
}
/**
* Adds the Guid object to the response
*
*/
public GetAllMediaLibraryRequest withIncludeGuids(QueryParamIncludeGuids includeGuids) {
Utils.checkNotNull(includeGuids, "includeGuids");
this.includeGuids = Optional.ofNullable(includeGuids);
return this;
}
/**
* Adds the Guid object to the response
*
*/
public GetAllMediaLibraryRequest withIncludeGuids(Optional<? extends QueryParamIncludeGuids> includeGuids) {
Utils.checkNotNull(includeGuids, "includeGuids");
this.includeGuids = includeGuids;
return this;
}
public GetAllMediaLibraryRequest withIncludeAdvanced(IncludeAdvanced includeAdvanced) {
Utils.checkNotNull(includeAdvanced, "includeAdvanced");
this.includeAdvanced = Optional.ofNullable(includeAdvanced);
return this;
}
public GetAllMediaLibraryRequest withIncludeAdvanced(Optional<? extends IncludeAdvanced> includeAdvanced) {
Utils.checkNotNull(includeAdvanced, "includeAdvanced");
this.includeAdvanced = includeAdvanced;
return this;
}
public GetAllMediaLibraryRequest withIncludeCollections(QueryParamIncludeCollections includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = Optional.ofNullable(includeCollections);
return this;
}
public GetAllMediaLibraryRequest withIncludeCollections(Optional<? extends QueryParamIncludeCollections> includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = includeCollections;
return this;
}
public GetAllMediaLibraryRequest withIncludeExternalMedia(QueryParamIncludeExternalMedia includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = Optional.ofNullable(includeExternalMedia);
return this;
}
public GetAllMediaLibraryRequest withIncludeExternalMedia(Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = includeExternalMedia;
return this;
}
/**
* The index of the first item to return. If not specified, the first item will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 0
*
*/
public GetAllMediaLibraryRequest withXPlexContainerStart(int xPlexContainerStart) {
Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart");
this.xPlexContainerStart = Optional.ofNullable(xPlexContainerStart);
return this;
}
/**
* The index of the first item to return. If not specified, the first item will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 0
*
*/
public GetAllMediaLibraryRequest withXPlexContainerStart(Optional<Integer> xPlexContainerStart) {
Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart");
this.xPlexContainerStart = xPlexContainerStart;
return this;
}
/**
* The number of items to return. If not specified, all items will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 50
*
*/
public GetAllMediaLibraryRequest withXPlexContainerSize(int xPlexContainerSize) {
Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize");
this.xPlexContainerSize = Optional.ofNullable(xPlexContainerSize);
return this;
}
/**
* The number of items to return. If not specified, all items will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 50
*
*/
public GetAllMediaLibraryRequest withXPlexContainerSize(Optional<Integer> xPlexContainerSize) {
Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize");
this.xPlexContainerSize = xPlexContainerSize;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryRequest other = (GetAllMediaLibraryRequest) o;
return
Objects.deepEquals(this.sectionKey, other.sectionKey) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.includeMeta, other.includeMeta) &&
Objects.deepEquals(this.includeGuids, other.includeGuids) &&
Objects.deepEquals(this.includeAdvanced, other.includeAdvanced) &&
Objects.deepEquals(this.includeCollections, other.includeCollections) &&
Objects.deepEquals(this.includeExternalMedia, other.includeExternalMedia) &&
Objects.deepEquals(this.xPlexContainerStart, other.xPlexContainerStart) &&
Objects.deepEquals(this.xPlexContainerSize, other.xPlexContainerSize);
}
@Override
public int hashCode() {
return Objects.hash(
sectionKey,
type,
includeMeta,
includeGuids,
includeAdvanced,
includeCollections,
includeExternalMedia,
xPlexContainerStart,
xPlexContainerSize);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryRequest.class,
"sectionKey", sectionKey,
"type", type,
"includeMeta", includeMeta,
"includeGuids", includeGuids,
"includeAdvanced", includeAdvanced,
"includeCollections", includeCollections,
"includeExternalMedia", includeExternalMedia,
"xPlexContainerStart", xPlexContainerStart,
"xPlexContainerSize", xPlexContainerSize);
}
public final static class Builder {
private Integer sectionKey;
private GetAllMediaLibraryQueryParamType type;
private Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta> includeMeta;
private Optional<? extends QueryParamIncludeGuids> includeGuids;
private Optional<? extends IncludeAdvanced> includeAdvanced;
private Optional<? extends QueryParamIncludeCollections> includeCollections;
private Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia;
private Optional<Integer> xPlexContainerStart;
private Optional<Integer> xPlexContainerSize;
private Builder() {
// force use of static builder() method
}
/**
* The unique key of the Plex library.
* Note: This is unique in the context of the Plex server.
*
*/
public Builder sectionKey(int sectionKey) {
Utils.checkNotNull(sectionKey, "sectionKey");
this.sectionKey = sectionKey;
return this;
}
/**
* The type of media to retrieve or filter by.
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*
*/
public Builder type(GetAllMediaLibraryQueryParamType type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
/**
* Adds the Meta object to the response
*
*/
public Builder includeMeta(GetAllMediaLibraryQueryParamIncludeMeta includeMeta) {
Utils.checkNotNull(includeMeta, "includeMeta");
this.includeMeta = Optional.ofNullable(includeMeta);
return this;
}
/**
* Adds the Meta object to the response
*
*/
public Builder includeMeta(Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta> includeMeta) {
Utils.checkNotNull(includeMeta, "includeMeta");
this.includeMeta = includeMeta;
return this;
}
/**
* Adds the Guid object to the response
*
*/
public Builder includeGuids(QueryParamIncludeGuids includeGuids) {
Utils.checkNotNull(includeGuids, "includeGuids");
this.includeGuids = Optional.ofNullable(includeGuids);
return this;
}
/**
* Adds the Guid object to the response
*
*/
public Builder includeGuids(Optional<? extends QueryParamIncludeGuids> includeGuids) {
Utils.checkNotNull(includeGuids, "includeGuids");
this.includeGuids = includeGuids;
return this;
}
public Builder includeAdvanced(IncludeAdvanced includeAdvanced) {
Utils.checkNotNull(includeAdvanced, "includeAdvanced");
this.includeAdvanced = Optional.ofNullable(includeAdvanced);
return this;
}
public Builder includeAdvanced(Optional<? extends IncludeAdvanced> includeAdvanced) {
Utils.checkNotNull(includeAdvanced, "includeAdvanced");
this.includeAdvanced = includeAdvanced;
return this;
}
public Builder includeCollections(QueryParamIncludeCollections includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = Optional.ofNullable(includeCollections);
return this;
}
public Builder includeCollections(Optional<? extends QueryParamIncludeCollections> includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = includeCollections;
return this;
}
public Builder includeExternalMedia(QueryParamIncludeExternalMedia includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = Optional.ofNullable(includeExternalMedia);
return this;
}
public Builder includeExternalMedia(Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = includeExternalMedia;
return this;
}
/**
* The index of the first item to return. If not specified, the first item will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 0
*
*/
public Builder xPlexContainerStart(int xPlexContainerStart) {
Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart");
this.xPlexContainerStart = Optional.ofNullable(xPlexContainerStart);
return this;
}
/**
* The index of the first item to return. If not specified, the first item will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 0
*
*/
public Builder xPlexContainerStart(Optional<Integer> xPlexContainerStart) {
Utils.checkNotNull(xPlexContainerStart, "xPlexContainerStart");
this.xPlexContainerStart = xPlexContainerStart;
return this;
}
/**
* The number of items to return. If not specified, all items will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 50
*
*/
public Builder xPlexContainerSize(int xPlexContainerSize) {
Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize");
this.xPlexContainerSize = Optional.ofNullable(xPlexContainerSize);
return this;
}
/**
* The number of items to return. If not specified, all items will be returned.
* If the number of items exceeds the limit, the response will be paginated.
* By default this is 50
*
*/
public Builder xPlexContainerSize(Optional<Integer> xPlexContainerSize) {
Utils.checkNotNull(xPlexContainerSize, "xPlexContainerSize");
this.xPlexContainerSize = xPlexContainerSize;
return this;
}
public GetAllMediaLibraryRequest build() {
if (includeMeta == null) {
includeMeta = _SINGLETON_VALUE_IncludeMeta.value();
}
if (includeGuids == null) {
includeGuids = _SINGLETON_VALUE_IncludeGuids.value();
}
if (includeAdvanced == null) {
includeAdvanced = _SINGLETON_VALUE_IncludeAdvanced.value();
}
if (includeCollections == null) {
includeCollections = _SINGLETON_VALUE_IncludeCollections.value();
}
if (includeExternalMedia == null) {
includeExternalMedia = _SINGLETON_VALUE_IncludeExternalMedia.value();
}
if (xPlexContainerStart == null) {
xPlexContainerStart = _SINGLETON_VALUE_XPlexContainerStart.value();
}
if (xPlexContainerSize == null) {
xPlexContainerSize = _SINGLETON_VALUE_XPlexContainerSize.value();
} return new GetAllMediaLibraryRequest(
sectionKey,
type,
includeMeta,
includeGuids,
includeAdvanced,
includeCollections,
includeExternalMedia,
xPlexContainerStart,
xPlexContainerSize);
}
private static final LazySingletonValue<Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta>> _SINGLETON_VALUE_IncludeMeta =
new LazySingletonValue<>(
"includeMeta",
"0",
new TypeReference<Optional<? extends GetAllMediaLibraryQueryParamIncludeMeta>>() {});
private static final LazySingletonValue<Optional<? extends QueryParamIncludeGuids>> _SINGLETON_VALUE_IncludeGuids =
new LazySingletonValue<>(
"includeGuids",
"0",
new TypeReference<Optional<? extends QueryParamIncludeGuids>>() {});
private static final LazySingletonValue<Optional<? extends IncludeAdvanced>> _SINGLETON_VALUE_IncludeAdvanced =
new LazySingletonValue<>(
"includeAdvanced",
"0",
new TypeReference<Optional<? extends IncludeAdvanced>>() {});
private static final LazySingletonValue<Optional<? extends QueryParamIncludeCollections>> _SINGLETON_VALUE_IncludeCollections =
new LazySingletonValue<>(
"includeCollections",
"0",
new TypeReference<Optional<? extends QueryParamIncludeCollections>>() {});
private static final LazySingletonValue<Optional<? extends QueryParamIncludeExternalMedia>> _SINGLETON_VALUE_IncludeExternalMedia =
new LazySingletonValue<>(
"includeExternalMedia",
"0",
new TypeReference<Optional<? extends QueryParamIncludeExternalMedia>>() {});
private static final LazySingletonValue<Optional<Integer>> _SINGLETON_VALUE_XPlexContainerStart =
new LazySingletonValue<>(
"X-Plex-Container-Start",
"0",
new TypeReference<Optional<Integer>>() {});
private static final LazySingletonValue<Optional<Integer>> _SINGLETON_VALUE_XPlexContainerSize =
new LazySingletonValue<>(
"X-Plex-Container-Size",
"50",
new TypeReference<Optional<Integer>>() {});
}
}

View File

@@ -0,0 +1,29 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import dev.plexapi.sdk.utils.Utils;
public class GetAllMediaLibraryRequestBuilder {
private GetAllMediaLibraryRequest request;
private final SDKMethodInterfaces.MethodCallGetAllMediaLibrary sdk;
public GetAllMediaLibraryRequestBuilder(SDKMethodInterfaces.MethodCallGetAllMediaLibrary sdk) {
this.sdk = sdk;
}
public GetAllMediaLibraryRequestBuilder request(GetAllMediaLibraryRequest request) {
Utils.checkNotNull(request, "request");
this.request = request;
return this;
}
public GetAllMediaLibraryResponse call() throws Exception {
return sdk.getAllMediaLibrary(
request);
}
}

View File

@@ -0,0 +1,251 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import dev.plexapi.sdk.utils.Response;
import dev.plexapi.sdk.utils.Utils;
import java.io.InputStream;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryResponse implements Response {
/**
* HTTP response content type for this operation
*/
private String contentType;
/**
* HTTP response status code for this operation
*/
private int statusCode;
/**
* Raw HTTP response; suitable for custom response parsing
*/
private HttpResponse<InputStream> rawResponse;
/**
* Successful response containing media container data.
*/
private Optional<? extends GetAllMediaLibraryResponseBody> object;
@JsonCreator
public GetAllMediaLibraryResponse(
String contentType,
int statusCode,
HttpResponse<InputStream> rawResponse,
Optional<? extends GetAllMediaLibraryResponseBody> object) {
Utils.checkNotNull(contentType, "contentType");
Utils.checkNotNull(statusCode, "statusCode");
Utils.checkNotNull(rawResponse, "rawResponse");
Utils.checkNotNull(object, "object");
this.contentType = contentType;
this.statusCode = statusCode;
this.rawResponse = rawResponse;
this.object = object;
}
public GetAllMediaLibraryResponse(
String contentType,
int statusCode,
HttpResponse<InputStream> rawResponse) {
this(contentType, statusCode, rawResponse, Optional.empty());
}
/**
* HTTP response content type for this operation
*/
@JsonIgnore
public String contentType() {
return contentType;
}
/**
* HTTP response status code for this operation
*/
@JsonIgnore
public int statusCode() {
return statusCode;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonIgnore
public HttpResponse<InputStream> rawResponse() {
return rawResponse;
}
/**
* Successful response containing media container data.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryResponseBody> object() {
return (Optional<GetAllMediaLibraryResponseBody>) object;
}
public final static Builder builder() {
return new Builder();
}
/**
* HTTP response content type for this operation
*/
public GetAllMediaLibraryResponse withContentType(String contentType) {
Utils.checkNotNull(contentType, "contentType");
this.contentType = contentType;
return this;
}
/**
* HTTP response status code for this operation
*/
public GetAllMediaLibraryResponse withStatusCode(int statusCode) {
Utils.checkNotNull(statusCode, "statusCode");
this.statusCode = statusCode;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllMediaLibraryResponse withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
/**
* Successful response containing media container data.
*/
public GetAllMediaLibraryResponse withObject(GetAllMediaLibraryResponseBody object) {
Utils.checkNotNull(object, "object");
this.object = Optional.ofNullable(object);
return this;
}
/**
* Successful response containing media container data.
*/
public GetAllMediaLibraryResponse withObject(Optional<? extends GetAllMediaLibraryResponseBody> object) {
Utils.checkNotNull(object, "object");
this.object = object;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryResponse other = (GetAllMediaLibraryResponse) o;
return
Objects.deepEquals(this.contentType, other.contentType) &&
Objects.deepEquals(this.statusCode, other.statusCode) &&
Objects.deepEquals(this.rawResponse, other.rawResponse) &&
Objects.deepEquals(this.object, other.object);
}
@Override
public int hashCode() {
return Objects.hash(
contentType,
statusCode,
rawResponse,
object);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryResponse.class,
"contentType", contentType,
"statusCode", statusCode,
"rawResponse", rawResponse,
"object", object);
}
public final static class Builder {
private String contentType;
private Integer statusCode;
private HttpResponse<InputStream> rawResponse;
private Optional<? extends GetAllMediaLibraryResponseBody> object = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* HTTP response content type for this operation
*/
public Builder contentType(String contentType) {
Utils.checkNotNull(contentType, "contentType");
this.contentType = contentType;
return this;
}
/**
* HTTP response status code for this operation
*/
public Builder statusCode(int statusCode) {
Utils.checkNotNull(statusCode, "statusCode");
this.statusCode = statusCode;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
/**
* Successful response containing media container data.
*/
public Builder object(GetAllMediaLibraryResponseBody object) {
Utils.checkNotNull(object, "object");
this.object = Optional.ofNullable(object);
return this;
}
/**
* Successful response containing media container data.
*/
public Builder object(Optional<? extends GetAllMediaLibraryResponseBody> object) {
Utils.checkNotNull(object, "object");
this.object = object;
return this;
}
public GetAllMediaLibraryResponse build() {
return new GetAllMediaLibraryResponse(
contentType,
statusCode,
rawResponse,
object);
}
}
}

View File

@@ -0,0 +1,114 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllMediaLibraryResponseBody - Successful response containing media container data.
*/
public class GetAllMediaLibraryResponseBody {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("MediaContainer")
private Optional<? extends GetAllMediaLibraryMediaContainer> mediaContainer;
@JsonCreator
public GetAllMediaLibraryResponseBody(
@JsonProperty("MediaContainer") Optional<? extends GetAllMediaLibraryMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
}
public GetAllMediaLibraryResponseBody() {
this(Optional.empty());
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryMediaContainer> mediaContainer() {
return (Optional<GetAllMediaLibraryMediaContainer>) mediaContainer;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryResponseBody withMediaContainer(GetAllMediaLibraryMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = Optional.ofNullable(mediaContainer);
return this;
}
public GetAllMediaLibraryResponseBody withMediaContainer(Optional<? extends GetAllMediaLibraryMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryResponseBody other = (GetAllMediaLibraryResponseBody) o;
return
Objects.deepEquals(this.mediaContainer, other.mediaContainer);
}
@Override
public int hashCode() {
return Objects.hash(
mediaContainer);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryResponseBody.class,
"mediaContainer", mediaContainer);
}
public final static class Builder {
private Optional<? extends GetAllMediaLibraryMediaContainer> mediaContainer = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder mediaContainer(GetAllMediaLibraryMediaContainer mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = Optional.ofNullable(mediaContainer);
return this;
}
public Builder mediaContainer(Optional<? extends GetAllMediaLibraryMediaContainer> mediaContainer) {
Utils.checkNotNull(mediaContainer, "mediaContainer");
this.mediaContainer = mediaContainer;
return this;
}
public GetAllMediaLibraryResponseBody build() {
return new GetAllMediaLibraryResponseBody(
mediaContainer);
}
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryRole {
/**
* The name of the actor for this role
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetAllMediaLibraryRole(
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
/**
* The name of the actor for this role
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The name of the actor for this role
*/
public GetAllMediaLibraryRole withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryRole other = (GetAllMediaLibraryRole) o;
return
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryRole.class,
"tag", tag);
}
public final static class Builder {
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The name of the actor for this role
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetAllMediaLibraryRole build() {
return new GetAllMediaLibraryRole(
tag);
}
}
}

View File

@@ -0,0 +1,450 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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 com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibrarySort {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("default")
private Optional<String> default_;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("active")
private Optional<Boolean> active;
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("activeDirection")
private Optional<? extends GetAllMediaLibraryActiveDirection> activeDirection;
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("defaultDirection")
private Optional<? extends GetAllMediaLibraryDefaultDirection> defaultDirection;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("descKey")
private Optional<String> descKey;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("firstCharacterKey")
private Optional<String> firstCharacterKey;
@JsonProperty("key")
private String key;
@JsonProperty("title")
private String title;
@JsonCreator
public GetAllMediaLibrarySort(
@JsonProperty("default") Optional<String> default_,
@JsonProperty("active") Optional<Boolean> active,
@JsonProperty("activeDirection") Optional<? extends GetAllMediaLibraryActiveDirection> activeDirection,
@JsonProperty("defaultDirection") Optional<? extends GetAllMediaLibraryDefaultDirection> defaultDirection,
@JsonProperty("descKey") Optional<String> descKey,
@JsonProperty("firstCharacterKey") Optional<String> firstCharacterKey,
@JsonProperty("key") String key,
@JsonProperty("title") String title) {
Utils.checkNotNull(default_, "default_");
Utils.checkNotNull(active, "active");
Utils.checkNotNull(activeDirection, "activeDirection");
Utils.checkNotNull(defaultDirection, "defaultDirection");
Utils.checkNotNull(descKey, "descKey");
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
this.default_ = default_;
this.active = active;
this.activeDirection = activeDirection;
this.defaultDirection = defaultDirection;
this.descKey = descKey;
this.firstCharacterKey = firstCharacterKey;
this.key = key;
this.title = title;
}
public GetAllMediaLibrarySort(
String key,
String title) {
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, title);
}
@JsonIgnore
public Optional<String> default_() {
return default_;
}
@JsonIgnore
public Optional<Boolean> active() {
return active;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryActiveDirection> activeDirection() {
return (Optional<GetAllMediaLibraryActiveDirection>) activeDirection;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetAllMediaLibraryDefaultDirection> defaultDirection() {
return (Optional<GetAllMediaLibraryDefaultDirection>) defaultDirection;
}
@JsonIgnore
public Optional<String> descKey() {
return descKey;
}
@JsonIgnore
public Optional<String> firstCharacterKey() {
return firstCharacterKey;
}
@JsonIgnore
public String key() {
return key;
}
@JsonIgnore
public String title() {
return title;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibrarySort withDefault(String default_) {
Utils.checkNotNull(default_, "default_");
this.default_ = Optional.ofNullable(default_);
return this;
}
public GetAllMediaLibrarySort withDefault(Optional<String> default_) {
Utils.checkNotNull(default_, "default_");
this.default_ = default_;
return this;
}
public GetAllMediaLibrarySort withActive(boolean active) {
Utils.checkNotNull(active, "active");
this.active = Optional.ofNullable(active);
return this;
}
public GetAllMediaLibrarySort withActive(Optional<Boolean> active) {
Utils.checkNotNull(active, "active");
this.active = active;
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public GetAllMediaLibrarySort withActiveDirection(GetAllMediaLibraryActiveDirection activeDirection) {
Utils.checkNotNull(activeDirection, "activeDirection");
this.activeDirection = Optional.ofNullable(activeDirection);
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public GetAllMediaLibrarySort withActiveDirection(Optional<? extends GetAllMediaLibraryActiveDirection> activeDirection) {
Utils.checkNotNull(activeDirection, "activeDirection");
this.activeDirection = activeDirection;
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public GetAllMediaLibrarySort withDefaultDirection(GetAllMediaLibraryDefaultDirection defaultDirection) {
Utils.checkNotNull(defaultDirection, "defaultDirection");
this.defaultDirection = Optional.ofNullable(defaultDirection);
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public GetAllMediaLibrarySort withDefaultDirection(Optional<? extends GetAllMediaLibraryDefaultDirection> defaultDirection) {
Utils.checkNotNull(defaultDirection, "defaultDirection");
this.defaultDirection = defaultDirection;
return this;
}
public GetAllMediaLibrarySort withDescKey(String descKey) {
Utils.checkNotNull(descKey, "descKey");
this.descKey = Optional.ofNullable(descKey);
return this;
}
public GetAllMediaLibrarySort withDescKey(Optional<String> descKey) {
Utils.checkNotNull(descKey, "descKey");
this.descKey = descKey;
return this;
}
public GetAllMediaLibrarySort withFirstCharacterKey(String firstCharacterKey) {
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
this.firstCharacterKey = Optional.ofNullable(firstCharacterKey);
return this;
}
public GetAllMediaLibrarySort withFirstCharacterKey(Optional<String> firstCharacterKey) {
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
this.firstCharacterKey = firstCharacterKey;
return this;
}
public GetAllMediaLibrarySort withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllMediaLibrarySort withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibrarySort other = (GetAllMediaLibrarySort) o;
return
Objects.deepEquals(this.default_, other.default_) &&
Objects.deepEquals(this.active, other.active) &&
Objects.deepEquals(this.activeDirection, other.activeDirection) &&
Objects.deepEquals(this.defaultDirection, other.defaultDirection) &&
Objects.deepEquals(this.descKey, other.descKey) &&
Objects.deepEquals(this.firstCharacterKey, other.firstCharacterKey) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title);
}
@Override
public int hashCode() {
return Objects.hash(
default_,
active,
activeDirection,
defaultDirection,
descKey,
firstCharacterKey,
key,
title);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibrarySort.class,
"default_", default_,
"active", active,
"activeDirection", activeDirection,
"defaultDirection", defaultDirection,
"descKey", descKey,
"firstCharacterKey", firstCharacterKey,
"key", key,
"title", title);
}
public final static class Builder {
private Optional<String> default_ = Optional.empty();
private Optional<Boolean> active = Optional.empty();
private Optional<? extends GetAllMediaLibraryActiveDirection> activeDirection;
private Optional<? extends GetAllMediaLibraryDefaultDirection> defaultDirection;
private Optional<String> descKey = Optional.empty();
private Optional<String> firstCharacterKey = Optional.empty();
private String key;
private String title;
private Builder() {
// force use of static builder() method
}
public Builder default_(String default_) {
Utils.checkNotNull(default_, "default_");
this.default_ = Optional.ofNullable(default_);
return this;
}
public Builder default_(Optional<String> default_) {
Utils.checkNotNull(default_, "default_");
this.default_ = default_;
return this;
}
public Builder active(boolean active) {
Utils.checkNotNull(active, "active");
this.active = Optional.ofNullable(active);
return this;
}
public Builder active(Optional<Boolean> active) {
Utils.checkNotNull(active, "active");
this.active = active;
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public Builder activeDirection(GetAllMediaLibraryActiveDirection activeDirection) {
Utils.checkNotNull(activeDirection, "activeDirection");
this.activeDirection = Optional.ofNullable(activeDirection);
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public Builder activeDirection(Optional<? extends GetAllMediaLibraryActiveDirection> activeDirection) {
Utils.checkNotNull(activeDirection, "activeDirection");
this.activeDirection = activeDirection;
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public Builder defaultDirection(GetAllMediaLibraryDefaultDirection defaultDirection) {
Utils.checkNotNull(defaultDirection, "defaultDirection");
this.defaultDirection = Optional.ofNullable(defaultDirection);
return this;
}
/**
* The direction of the sort. Can be either `asc` or `desc`.
*
*/
public Builder defaultDirection(Optional<? extends GetAllMediaLibraryDefaultDirection> defaultDirection) {
Utils.checkNotNull(defaultDirection, "defaultDirection");
this.defaultDirection = defaultDirection;
return this;
}
public Builder descKey(String descKey) {
Utils.checkNotNull(descKey, "descKey");
this.descKey = Optional.ofNullable(descKey);
return this;
}
public Builder descKey(Optional<String> descKey) {
Utils.checkNotNull(descKey, "descKey");
this.descKey = descKey;
return this;
}
public Builder firstCharacterKey(String firstCharacterKey) {
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
this.firstCharacterKey = Optional.ofNullable(firstCharacterKey);
return this;
}
public Builder firstCharacterKey(Optional<String> firstCharacterKey) {
Utils.checkNotNull(firstCharacterKey, "firstCharacterKey");
this.firstCharacterKey = firstCharacterKey;
return this;
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllMediaLibrarySort build() {
if (activeDirection == null) {
activeDirection = _SINGLETON_VALUE_ActiveDirection.value();
}
if (defaultDirection == null) {
defaultDirection = _SINGLETON_VALUE_DefaultDirection.value();
} return new GetAllMediaLibrarySort(
default_,
active,
activeDirection,
defaultDirection,
descKey,
firstCharacterKey,
key,
title);
}
private static final LazySingletonValue<Optional<? extends GetAllMediaLibraryActiveDirection>> _SINGLETON_VALUE_ActiveDirection =
new LazySingletonValue<>(
"activeDirection",
"\"asc\"",
new TypeReference<Optional<? extends GetAllMediaLibraryActiveDirection>>() {});
private static final LazySingletonValue<Optional<? extends GetAllMediaLibraryDefaultDirection>> _SINGLETON_VALUE_DefaultDirection =
new LazySingletonValue<>(
"defaultDirection",
"\"asc\"",
new TypeReference<Optional<? extends GetAllMediaLibraryDefaultDirection>>() {});
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,361 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
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.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
public class GetAllMediaLibraryType {
@JsonProperty("key")
private String key;
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("subtype")
private Optional<String> subtype;
@JsonProperty("title")
private String title;
@JsonProperty("active")
private boolean active;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Filter")
private Optional<? extends List<GetAllMediaLibraryFilter>> filter;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Sort")
private Optional<? extends List<GetAllMediaLibrarySort>> sort;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Field")
private Optional<? extends List<GetAllMediaLibraryField>> field;
@JsonCreator
public GetAllMediaLibraryType(
@JsonProperty("key") String key,
@JsonProperty("type") String type,
@JsonProperty("subtype") Optional<String> subtype,
@JsonProperty("title") String title,
@JsonProperty("active") boolean active,
@JsonProperty("Filter") Optional<? extends List<GetAllMediaLibraryFilter>> filter,
@JsonProperty("Sort") Optional<? extends List<GetAllMediaLibrarySort>> sort,
@JsonProperty("Field") Optional<? extends List<GetAllMediaLibraryField>> field) {
Utils.checkNotNull(key, "key");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(subtype, "subtype");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(active, "active");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(sort, "sort");
Utils.checkNotNull(field, "field");
this.key = key;
this.type = type;
this.subtype = subtype;
this.title = title;
this.active = active;
this.filter = filter;
this.sort = sort;
this.field = field;
}
public GetAllMediaLibraryType(
String key,
String type,
String title,
boolean active) {
this(key, type, Optional.empty(), title, active, Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public String key() {
return key;
}
@JsonIgnore
public String type() {
return type;
}
@JsonIgnore
public Optional<String> subtype() {
return subtype;
}
@JsonIgnore
public String title() {
return title;
}
@JsonIgnore
public boolean active() {
return active;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibraryFilter>> filter() {
return (Optional<List<GetAllMediaLibraryFilter>>) filter;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibrarySort>> sort() {
return (Optional<List<GetAllMediaLibrarySort>>) sort;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<GetAllMediaLibraryField>> field() {
return (Optional<List<GetAllMediaLibraryField>>) field;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryType withKey(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public GetAllMediaLibraryType withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public GetAllMediaLibraryType withSubtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public GetAllMediaLibraryType withSubtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public GetAllMediaLibraryType withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public GetAllMediaLibraryType withActive(boolean active) {
Utils.checkNotNull(active, "active");
this.active = active;
return this;
}
public GetAllMediaLibraryType withFilter(List<GetAllMediaLibraryFilter> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.ofNullable(filter);
return this;
}
public GetAllMediaLibraryType withFilter(Optional<? extends List<GetAllMediaLibraryFilter>> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
public GetAllMediaLibraryType withSort(List<GetAllMediaLibrarySort> sort) {
Utils.checkNotNull(sort, "sort");
this.sort = Optional.ofNullable(sort);
return this;
}
public GetAllMediaLibraryType withSort(Optional<? extends List<GetAllMediaLibrarySort>> sort) {
Utils.checkNotNull(sort, "sort");
this.sort = sort;
return this;
}
public GetAllMediaLibraryType withField(List<GetAllMediaLibraryField> field) {
Utils.checkNotNull(field, "field");
this.field = Optional.ofNullable(field);
return this;
}
public GetAllMediaLibraryType withField(Optional<? extends List<GetAllMediaLibraryField>> field) {
Utils.checkNotNull(field, "field");
this.field = field;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryType other = (GetAllMediaLibraryType) o;
return
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.subtype, other.subtype) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.active, other.active) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.sort, other.sort) &&
Objects.deepEquals(this.field, other.field);
}
@Override
public int hashCode() {
return Objects.hash(
key,
type,
subtype,
title,
active,
filter,
sort,
field);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryType.class,
"key", key,
"type", type,
"subtype", subtype,
"title", title,
"active", active,
"filter", filter,
"sort", sort,
"field", field);
}
public final static class Builder {
private String key;
private String type;
private Optional<String> subtype = Optional.empty();
private String title;
private Boolean active;
private Optional<? extends List<GetAllMediaLibraryFilter>> filter = Optional.empty();
private Optional<? extends List<GetAllMediaLibrarySort>> sort = Optional.empty();
private Optional<? extends List<GetAllMediaLibraryField>> field = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder key(String key) {
Utils.checkNotNull(key, "key");
this.key = key;
return this;
}
public Builder type(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
}
public Builder subtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public Builder subtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
return this;
}
public Builder active(boolean active) {
Utils.checkNotNull(active, "active");
this.active = active;
return this;
}
public Builder filter(List<GetAllMediaLibraryFilter> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = Optional.ofNullable(filter);
return this;
}
public Builder filter(Optional<? extends List<GetAllMediaLibraryFilter>> filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
public Builder sort(List<GetAllMediaLibrarySort> sort) {
Utils.checkNotNull(sort, "sort");
this.sort = Optional.ofNullable(sort);
return this;
}
public Builder sort(Optional<? extends List<GetAllMediaLibrarySort>> sort) {
Utils.checkNotNull(sort, "sort");
this.sort = sort;
return this;
}
public Builder field(List<GetAllMediaLibraryField> field) {
Utils.checkNotNull(field, "field");
this.field = Optional.ofNullable(field);
return this;
}
public Builder field(Optional<? extends List<GetAllMediaLibraryField>> field) {
Utils.checkNotNull(field, "field");
this.field = field;
return this;
}
public GetAllMediaLibraryType build() {
return new GetAllMediaLibraryType(
key,
type,
subtype,
title,
active,
filter,
sort,
field);
}
}
}

View File

@@ -0,0 +1,176 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryUltraBlurColors {
@JsonProperty("topLeft")
private String topLeft;
@JsonProperty("topRight")
private String topRight;
@JsonProperty("bottomRight")
private String bottomRight;
@JsonProperty("bottomLeft")
private String bottomLeft;
@JsonCreator
public GetAllMediaLibraryUltraBlurColors(
@JsonProperty("topLeft") String topLeft,
@JsonProperty("topRight") String topRight,
@JsonProperty("bottomRight") String bottomRight,
@JsonProperty("bottomLeft") String bottomLeft) {
Utils.checkNotNull(topLeft, "topLeft");
Utils.checkNotNull(topRight, "topRight");
Utils.checkNotNull(bottomRight, "bottomRight");
Utils.checkNotNull(bottomLeft, "bottomLeft");
this.topLeft = topLeft;
this.topRight = topRight;
this.bottomRight = bottomRight;
this.bottomLeft = bottomLeft;
}
@JsonIgnore
public String topLeft() {
return topLeft;
}
@JsonIgnore
public String topRight() {
return topRight;
}
@JsonIgnore
public String bottomRight() {
return bottomRight;
}
@JsonIgnore
public String bottomLeft() {
return bottomLeft;
}
public final static Builder builder() {
return new Builder();
}
public GetAllMediaLibraryUltraBlurColors withTopLeft(String topLeft) {
Utils.checkNotNull(topLeft, "topLeft");
this.topLeft = topLeft;
return this;
}
public GetAllMediaLibraryUltraBlurColors withTopRight(String topRight) {
Utils.checkNotNull(topRight, "topRight");
this.topRight = topRight;
return this;
}
public GetAllMediaLibraryUltraBlurColors withBottomRight(String bottomRight) {
Utils.checkNotNull(bottomRight, "bottomRight");
this.bottomRight = bottomRight;
return this;
}
public GetAllMediaLibraryUltraBlurColors withBottomLeft(String bottomLeft) {
Utils.checkNotNull(bottomLeft, "bottomLeft");
this.bottomLeft = bottomLeft;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryUltraBlurColors other = (GetAllMediaLibraryUltraBlurColors) o;
return
Objects.deepEquals(this.topLeft, other.topLeft) &&
Objects.deepEquals(this.topRight, other.topRight) &&
Objects.deepEquals(this.bottomRight, other.bottomRight) &&
Objects.deepEquals(this.bottomLeft, other.bottomLeft);
}
@Override
public int hashCode() {
return Objects.hash(
topLeft,
topRight,
bottomRight,
bottomLeft);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryUltraBlurColors.class,
"topLeft", topLeft,
"topRight", topRight,
"bottomRight", bottomRight,
"bottomLeft", bottomLeft);
}
public final static class Builder {
private String topLeft;
private String topRight;
private String bottomRight;
private String bottomLeft;
private Builder() {
// force use of static builder() method
}
public Builder topLeft(String topLeft) {
Utils.checkNotNull(topLeft, "topLeft");
this.topLeft = topLeft;
return this;
}
public Builder topRight(String topRight) {
Utils.checkNotNull(topRight, "topRight");
this.topRight = topRight;
return this;
}
public Builder bottomRight(String bottomRight) {
Utils.checkNotNull(bottomRight, "bottomRight");
this.bottomRight = bottomRight;
return this;
}
public Builder bottomLeft(String bottomLeft) {
Utils.checkNotNull(bottomLeft, "bottomLeft");
this.bottomLeft = bottomLeft;
return this;
}
public GetAllMediaLibraryUltraBlurColors build() {
return new GetAllMediaLibraryUltraBlurColors(
topLeft,
topRight,
bottomRight,
bottomLeft);
}
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetAllMediaLibraryWriter {
/**
* The role of Writer
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public GetAllMediaLibraryWriter(
@JsonProperty("tag") String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
}
/**
* The role of Writer
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
/**
* The role of Writer
*/
public GetAllMediaLibraryWriter withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllMediaLibraryWriter other = (GetAllMediaLibraryWriter) o;
return
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
tag);
}
@Override
public String toString() {
return Utils.toString(GetAllMediaLibraryWriter.class,
"tag", tag);
}
public final static class Builder {
private String tag;
private Builder() {
// force use of static builder() method
}
/**
* The role of Writer
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public GetAllMediaLibraryWriter build() {
return new GetAllMediaLibraryWriter(
tag);
}
}
}

View File

@@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
@@ -25,47 +24,75 @@ import java.util.Optional;
public class GetCountriesLibraryMediaContainer {
/**
* Number of media items returned in this response.
*/
@JsonProperty("size")
private double size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("offset")
private Optional<Integer> offset;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("totalSize")
private Optional<Integer> totalSize;
@JsonProperty("identifier")
private String identifier;
private int size;
/**
* Indicates whether syncing is allowed.
*/
@JsonProperty("allowSync")
private boolean allowSync;
/**
* URL for the background artwork of the media container.
*/
@JsonProperty("art")
private String art;
/**
* The content type or mode.
*/
@JsonProperty("content")
private String content;
/**
* An plugin identifier for the media container.
*/
@JsonProperty("identifier")
private String identifier;
/**
* The prefix used for media tag resource paths.
*/
@JsonProperty("mediaTagPrefix")
private String mediaTagPrefix;
/**
* The version number for media tags.
*/
@JsonProperty("mediaTagVersion")
private long mediaTagVersion;
/**
* Specifies whether caching is disabled.
*/
@JsonProperty("nocache")
private boolean nocache;
/**
* URL for the thumbnail image of the media container.
*/
@JsonProperty("thumb")
private String thumb;
/**
* The primary title of the media container.
*/
@JsonProperty("title1")
private String title1;
/**
* The secondary title of the media container.
*/
@JsonProperty("title2")
private String title2;
/**
* Identifier for the view group layout.
*/
@JsonProperty("viewGroup")
private String viewGroup;
@@ -75,13 +102,11 @@ public class GetCountriesLibraryMediaContainer {
@JsonCreator
public GetCountriesLibraryMediaContainer(
@JsonProperty("size") double size,
@JsonProperty("offset") Optional<Integer> offset,
@JsonProperty("totalSize") Optional<Integer> totalSize,
@JsonProperty("identifier") String identifier,
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("content") String content,
@JsonProperty("identifier") String identifier,
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
@JsonProperty("mediaTagVersion") long mediaTagVersion,
@JsonProperty("nocache") boolean nocache,
@@ -91,12 +116,10 @@ public class GetCountriesLibraryMediaContainer {
@JsonProperty("viewGroup") String viewGroup,
@JsonProperty("Directory") Optional<? extends List<GetCountriesLibraryDirectory>> directory) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(offset, "offset");
Utils.checkNotNull(totalSize, "totalSize");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(art, "art");
Utils.checkNotNull(content, "content");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
Utils.checkNotNull(nocache, "nocache");
@@ -106,12 +129,10 @@ public class GetCountriesLibraryMediaContainer {
Utils.checkNotNull(viewGroup, "viewGroup");
Utils.checkNotNull(directory, "directory");
this.size = size;
this.offset = offset;
this.totalSize = totalSize;
this.identifier = identifier;
this.allowSync = allowSync;
this.art = art;
this.content = content;
this.identifier = identifier;
this.mediaTagPrefix = mediaTagPrefix;
this.mediaTagVersion = mediaTagVersion;
this.nocache = nocache;
@@ -123,11 +144,11 @@ public class GetCountriesLibraryMediaContainer {
}
public GetCountriesLibraryMediaContainer(
double size,
String identifier,
int size,
boolean allowSync,
String art,
String content,
String identifier,
String mediaTagPrefix,
long mediaTagVersion,
boolean nocache,
@@ -135,74 +156,100 @@ public class GetCountriesLibraryMediaContainer {
String title1,
String title2,
String viewGroup) {
this(size, Optional.empty(), Optional.empty(), identifier, allowSync, art, content, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, Optional.empty());
this(size, allowSync, art, content, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, Optional.empty());
}
/**
* Number of media items returned in this response.
*/
@JsonIgnore
public double size() {
public int size() {
return size;
}
@JsonIgnore
public Optional<Integer> offset() {
return offset;
}
@JsonIgnore
public Optional<Integer> totalSize() {
return totalSize;
}
@JsonIgnore
public String identifier() {
return identifier;
}
/**
* Indicates whether syncing is allowed.
*/
@JsonIgnore
public boolean allowSync() {
return allowSync;
}
/**
* URL for the background artwork of the media container.
*/
@JsonIgnore
public String art() {
return art;
}
/**
* The content type or mode.
*/
@JsonIgnore
public String content() {
return content;
}
/**
* An plugin identifier for the media container.
*/
@JsonIgnore
public String identifier() {
return identifier;
}
/**
* The prefix used for media tag resource paths.
*/
@JsonIgnore
public String mediaTagPrefix() {
return mediaTagPrefix;
}
/**
* The version number for media tags.
*/
@JsonIgnore
public long mediaTagVersion() {
return mediaTagVersion;
}
/**
* Specifies whether caching is disabled.
*/
@JsonIgnore
public boolean nocache() {
return nocache;
}
/**
* URL for the thumbnail image of the media container.
*/
@JsonIgnore
public String thumb() {
return thumb;
}
/**
* The primary title of the media container.
*/
@JsonIgnore
public String title1() {
return title1;
}
/**
* The secondary title of the media container.
*/
@JsonIgnore
public String title2() {
return title2;
}
/**
* Identifier for the view group layout.
*/
@JsonIgnore
public String viewGroup() {
return viewGroup;
@@ -218,96 +265,108 @@ public class GetCountriesLibraryMediaContainer {
return new Builder();
}
public GetCountriesLibraryMediaContainer withSize(double size) {
/**
* Number of media items returned in this response.
*/
public GetCountriesLibraryMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetCountriesLibraryMediaContainer withOffset(int offset) {
Utils.checkNotNull(offset, "offset");
this.offset = Optional.ofNullable(offset);
return this;
}
public GetCountriesLibraryMediaContainer withOffset(Optional<Integer> offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
public GetCountriesLibraryMediaContainer withTotalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = Optional.ofNullable(totalSize);
return this;
}
public GetCountriesLibraryMediaContainer withTotalSize(Optional<Integer> totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
public GetCountriesLibraryMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public GetCountriesLibraryMediaContainer withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
/**
* URL for the background artwork of the media container.
*/
public GetCountriesLibraryMediaContainer withArt(String art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
/**
* The content type or mode.
*/
public GetCountriesLibraryMediaContainer withContent(String content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
/**
* An plugin identifier for the media container.
*/
public GetCountriesLibraryMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* The prefix used for media tag resource paths.
*/
public GetCountriesLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
/**
* The version number for media tags.
*/
public GetCountriesLibraryMediaContainer withMediaTagVersion(long mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
/**
* Specifies whether caching is disabled.
*/
public GetCountriesLibraryMediaContainer withNocache(boolean nocache) {
Utils.checkNotNull(nocache, "nocache");
this.nocache = nocache;
return this;
}
/**
* URL for the thumbnail image of the media container.
*/
public GetCountriesLibraryMediaContainer withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The primary title of the media container.
*/
public GetCountriesLibraryMediaContainer withTitle1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
/**
* The secondary title of the media container.
*/
public GetCountriesLibraryMediaContainer withTitle2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
/**
* Identifier for the view group layout.
*/
public GetCountriesLibraryMediaContainer withViewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
@@ -337,12 +396,10 @@ public class GetCountriesLibraryMediaContainer {
GetCountriesLibraryMediaContainer other = (GetCountriesLibraryMediaContainer) o;
return
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.offset, other.offset) &&
Objects.deepEquals(this.totalSize, other.totalSize) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.allowSync, other.allowSync) &&
Objects.deepEquals(this.art, other.art) &&
Objects.deepEquals(this.content, other.content) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) &&
Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) &&
Objects.deepEquals(this.nocache, other.nocache) &&
@@ -357,12 +414,10 @@ public class GetCountriesLibraryMediaContainer {
public int hashCode() {
return Objects.hash(
size,
offset,
totalSize,
identifier,
allowSync,
art,
content,
identifier,
mediaTagPrefix,
mediaTagVersion,
nocache,
@@ -377,12 +432,10 @@ public class GetCountriesLibraryMediaContainer {
public String toString() {
return Utils.toString(GetCountriesLibraryMediaContainer.class,
"size", size,
"offset", offset,
"totalSize", totalSize,
"identifier", identifier,
"allowSync", allowSync,
"art", art,
"content", content,
"identifier", identifier,
"mediaTagPrefix", mediaTagPrefix,
"mediaTagVersion", mediaTagVersion,
"nocache", nocache,
@@ -395,13 +448,7 @@ public class GetCountriesLibraryMediaContainer {
public final static class Builder {
private Double size;
private Optional<Integer> offset = Optional.empty();
private Optional<Integer> totalSize = Optional.empty();
private String identifier;
private Integer size;
private Boolean allowSync;
@@ -409,6 +456,8 @@ public class GetCountriesLibraryMediaContainer {
private String content;
private String identifier;
private String mediaTagPrefix;
private Long mediaTagVersion;
@@ -429,96 +478,108 @@ public class GetCountriesLibraryMediaContainer {
// force use of static builder() method
}
public Builder size(double size) {
/**
* Number of media items returned in this response.
*/
public Builder size(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Builder offset(int offset) {
Utils.checkNotNull(offset, "offset");
this.offset = Optional.ofNullable(offset);
return this;
}
public Builder offset(Optional<Integer> offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
public Builder totalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = Optional.ofNullable(totalSize);
return this;
}
public Builder totalSize(Optional<Integer> totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
/**
* URL for the background artwork of the media container.
*/
public Builder art(String art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
/**
* The content type or mode.
*/
public Builder content(String content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
/**
* An plugin identifier for the media container.
*/
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* The prefix used for media tag resource paths.
*/
public Builder mediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
/**
* The version number for media tags.
*/
public Builder mediaTagVersion(long mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
/**
* Specifies whether caching is disabled.
*/
public Builder nocache(boolean nocache) {
Utils.checkNotNull(nocache, "nocache");
this.nocache = nocache;
return this;
}
/**
* URL for the thumbnail image of the media container.
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The primary title of the media container.
*/
public Builder title1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
/**
* The secondary title of the media container.
*/
public Builder title2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
/**
* Identifier for the view group layout.
*/
public Builder viewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
@@ -540,12 +601,10 @@ public class GetCountriesLibraryMediaContainer {
public GetCountriesLibraryMediaContainer build() {
return new GetCountriesLibraryMediaContainer(
size,
offset,
totalSize,
identifier,
allowSync,
art,
content,
identifier,
mediaTagPrefix,
mediaTagVersion,
nocache,

View File

@@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
@@ -25,47 +24,75 @@ import java.util.Optional;
public class GetGenresLibraryMediaContainer {
/**
* Number of media items returned in this response.
*/
@JsonProperty("size")
private double size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("offset")
private Optional<Integer> offset;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("totalSize")
private Optional<Integer> totalSize;
@JsonProperty("identifier")
private String identifier;
private int size;
/**
* Indicates whether syncing is allowed.
*/
@JsonProperty("allowSync")
private boolean allowSync;
/**
* URL for the background artwork of the media container.
*/
@JsonProperty("art")
private String art;
/**
* The content type or mode.
*/
@JsonProperty("content")
private String content;
/**
* An plugin identifier for the media container.
*/
@JsonProperty("identifier")
private String identifier;
/**
* The prefix used for media tag resource paths.
*/
@JsonProperty("mediaTagPrefix")
private String mediaTagPrefix;
/**
* The version number for media tags.
*/
@JsonProperty("mediaTagVersion")
private long mediaTagVersion;
/**
* Specifies whether caching is disabled.
*/
@JsonProperty("nocache")
private boolean nocache;
/**
* URL for the thumbnail image of the media container.
*/
@JsonProperty("thumb")
private String thumb;
/**
* The primary title of the media container.
*/
@JsonProperty("title1")
private String title1;
/**
* The secondary title of the media container.
*/
@JsonProperty("title2")
private String title2;
/**
* Identifier for the view group layout.
*/
@JsonProperty("viewGroup")
private String viewGroup;
@@ -75,13 +102,11 @@ public class GetGenresLibraryMediaContainer {
@JsonCreator
public GetGenresLibraryMediaContainer(
@JsonProperty("size") double size,
@JsonProperty("offset") Optional<Integer> offset,
@JsonProperty("totalSize") Optional<Integer> totalSize,
@JsonProperty("identifier") String identifier,
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("art") String art,
@JsonProperty("content") String content,
@JsonProperty("identifier") String identifier,
@JsonProperty("mediaTagPrefix") String mediaTagPrefix,
@JsonProperty("mediaTagVersion") long mediaTagVersion,
@JsonProperty("nocache") boolean nocache,
@@ -91,12 +116,10 @@ public class GetGenresLibraryMediaContainer {
@JsonProperty("viewGroup") String viewGroup,
@JsonProperty("Directory") Optional<? extends List<GetGenresLibraryDirectory>> directory) {
Utils.checkNotNull(size, "size");
Utils.checkNotNull(offset, "offset");
Utils.checkNotNull(totalSize, "totalSize");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(allowSync, "allowSync");
Utils.checkNotNull(art, "art");
Utils.checkNotNull(content, "content");
Utils.checkNotNull(identifier, "identifier");
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
Utils.checkNotNull(nocache, "nocache");
@@ -106,12 +129,10 @@ public class GetGenresLibraryMediaContainer {
Utils.checkNotNull(viewGroup, "viewGroup");
Utils.checkNotNull(directory, "directory");
this.size = size;
this.offset = offset;
this.totalSize = totalSize;
this.identifier = identifier;
this.allowSync = allowSync;
this.art = art;
this.content = content;
this.identifier = identifier;
this.mediaTagPrefix = mediaTagPrefix;
this.mediaTagVersion = mediaTagVersion;
this.nocache = nocache;
@@ -123,11 +144,11 @@ public class GetGenresLibraryMediaContainer {
}
public GetGenresLibraryMediaContainer(
double size,
String identifier,
int size,
boolean allowSync,
String art,
String content,
String identifier,
String mediaTagPrefix,
long mediaTagVersion,
boolean nocache,
@@ -135,74 +156,100 @@ public class GetGenresLibraryMediaContainer {
String title1,
String title2,
String viewGroup) {
this(size, Optional.empty(), Optional.empty(), identifier, allowSync, art, content, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, Optional.empty());
this(size, allowSync, art, content, identifier, mediaTagPrefix, mediaTagVersion, nocache, thumb, title1, title2, viewGroup, Optional.empty());
}
/**
* Number of media items returned in this response.
*/
@JsonIgnore
public double size() {
public int size() {
return size;
}
@JsonIgnore
public Optional<Integer> offset() {
return offset;
}
@JsonIgnore
public Optional<Integer> totalSize() {
return totalSize;
}
@JsonIgnore
public String identifier() {
return identifier;
}
/**
* Indicates whether syncing is allowed.
*/
@JsonIgnore
public boolean allowSync() {
return allowSync;
}
/**
* URL for the background artwork of the media container.
*/
@JsonIgnore
public String art() {
return art;
}
/**
* The content type or mode.
*/
@JsonIgnore
public String content() {
return content;
}
/**
* An plugin identifier for the media container.
*/
@JsonIgnore
public String identifier() {
return identifier;
}
/**
* The prefix used for media tag resource paths.
*/
@JsonIgnore
public String mediaTagPrefix() {
return mediaTagPrefix;
}
/**
* The version number for media tags.
*/
@JsonIgnore
public long mediaTagVersion() {
return mediaTagVersion;
}
/**
* Specifies whether caching is disabled.
*/
@JsonIgnore
public boolean nocache() {
return nocache;
}
/**
* URL for the thumbnail image of the media container.
*/
@JsonIgnore
public String thumb() {
return thumb;
}
/**
* The primary title of the media container.
*/
@JsonIgnore
public String title1() {
return title1;
}
/**
* The secondary title of the media container.
*/
@JsonIgnore
public String title2() {
return title2;
}
/**
* Identifier for the view group layout.
*/
@JsonIgnore
public String viewGroup() {
return viewGroup;
@@ -218,96 +265,108 @@ public class GetGenresLibraryMediaContainer {
return new Builder();
}
public GetGenresLibraryMediaContainer withSize(double size) {
/**
* Number of media items returned in this response.
*/
public GetGenresLibraryMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public GetGenresLibraryMediaContainer withOffset(int offset) {
Utils.checkNotNull(offset, "offset");
this.offset = Optional.ofNullable(offset);
return this;
}
public GetGenresLibraryMediaContainer withOffset(Optional<Integer> offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
public GetGenresLibraryMediaContainer withTotalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = Optional.ofNullable(totalSize);
return this;
}
public GetGenresLibraryMediaContainer withTotalSize(Optional<Integer> totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
public GetGenresLibraryMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public GetGenresLibraryMediaContainer withAllowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
/**
* URL for the background artwork of the media container.
*/
public GetGenresLibraryMediaContainer withArt(String art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
/**
* The content type or mode.
*/
public GetGenresLibraryMediaContainer withContent(String content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
/**
* An plugin identifier for the media container.
*/
public GetGenresLibraryMediaContainer withIdentifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* The prefix used for media tag resource paths.
*/
public GetGenresLibraryMediaContainer withMediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
/**
* The version number for media tags.
*/
public GetGenresLibraryMediaContainer withMediaTagVersion(long mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
/**
* Specifies whether caching is disabled.
*/
public GetGenresLibraryMediaContainer withNocache(boolean nocache) {
Utils.checkNotNull(nocache, "nocache");
this.nocache = nocache;
return this;
}
/**
* URL for the thumbnail image of the media container.
*/
public GetGenresLibraryMediaContainer withThumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The primary title of the media container.
*/
public GetGenresLibraryMediaContainer withTitle1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
/**
* The secondary title of the media container.
*/
public GetGenresLibraryMediaContainer withTitle2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
/**
* Identifier for the view group layout.
*/
public GetGenresLibraryMediaContainer withViewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
@@ -337,12 +396,10 @@ public class GetGenresLibraryMediaContainer {
GetGenresLibraryMediaContainer other = (GetGenresLibraryMediaContainer) o;
return
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.offset, other.offset) &&
Objects.deepEquals(this.totalSize, other.totalSize) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.allowSync, other.allowSync) &&
Objects.deepEquals(this.art, other.art) &&
Objects.deepEquals(this.content, other.content) &&
Objects.deepEquals(this.identifier, other.identifier) &&
Objects.deepEquals(this.mediaTagPrefix, other.mediaTagPrefix) &&
Objects.deepEquals(this.mediaTagVersion, other.mediaTagVersion) &&
Objects.deepEquals(this.nocache, other.nocache) &&
@@ -357,12 +414,10 @@ public class GetGenresLibraryMediaContainer {
public int hashCode() {
return Objects.hash(
size,
offset,
totalSize,
identifier,
allowSync,
art,
content,
identifier,
mediaTagPrefix,
mediaTagVersion,
nocache,
@@ -377,12 +432,10 @@ public class GetGenresLibraryMediaContainer {
public String toString() {
return Utils.toString(GetGenresLibraryMediaContainer.class,
"size", size,
"offset", offset,
"totalSize", totalSize,
"identifier", identifier,
"allowSync", allowSync,
"art", art,
"content", content,
"identifier", identifier,
"mediaTagPrefix", mediaTagPrefix,
"mediaTagVersion", mediaTagVersion,
"nocache", nocache,
@@ -395,13 +448,7 @@ public class GetGenresLibraryMediaContainer {
public final static class Builder {
private Double size;
private Optional<Integer> offset = Optional.empty();
private Optional<Integer> totalSize = Optional.empty();
private String identifier;
private Integer size;
private Boolean allowSync;
@@ -409,6 +456,8 @@ public class GetGenresLibraryMediaContainer {
private String content;
private String identifier;
private String mediaTagPrefix;
private Long mediaTagVersion;
@@ -429,96 +478,108 @@ public class GetGenresLibraryMediaContainer {
// force use of static builder() method
}
public Builder size(double size) {
/**
* Number of media items returned in this response.
*/
public Builder size(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
}
public Builder offset(int offset) {
Utils.checkNotNull(offset, "offset");
this.offset = Optional.ofNullable(offset);
return this;
}
public Builder offset(Optional<Integer> offset) {
Utils.checkNotNull(offset, "offset");
this.offset = offset;
return this;
}
public Builder totalSize(int totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = Optional.ofNullable(totalSize);
return this;
}
public Builder totalSize(Optional<Integer> totalSize) {
Utils.checkNotNull(totalSize, "totalSize");
this.totalSize = totalSize;
return this;
}
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* Indicates whether syncing is allowed.
*/
public Builder allowSync(boolean allowSync) {
Utils.checkNotNull(allowSync, "allowSync");
this.allowSync = allowSync;
return this;
}
/**
* URL for the background artwork of the media container.
*/
public Builder art(String art) {
Utils.checkNotNull(art, "art");
this.art = art;
return this;
}
/**
* The content type or mode.
*/
public Builder content(String content) {
Utils.checkNotNull(content, "content");
this.content = content;
return this;
}
/**
* An plugin identifier for the media container.
*/
public Builder identifier(String identifier) {
Utils.checkNotNull(identifier, "identifier");
this.identifier = identifier;
return this;
}
/**
* The prefix used for media tag resource paths.
*/
public Builder mediaTagPrefix(String mediaTagPrefix) {
Utils.checkNotNull(mediaTagPrefix, "mediaTagPrefix");
this.mediaTagPrefix = mediaTagPrefix;
return this;
}
/**
* The version number for media tags.
*/
public Builder mediaTagVersion(long mediaTagVersion) {
Utils.checkNotNull(mediaTagVersion, "mediaTagVersion");
this.mediaTagVersion = mediaTagVersion;
return this;
}
/**
* Specifies whether caching is disabled.
*/
public Builder nocache(boolean nocache) {
Utils.checkNotNull(nocache, "nocache");
this.nocache = nocache;
return this;
}
/**
* URL for the thumbnail image of the media container.
*/
public Builder thumb(String thumb) {
Utils.checkNotNull(thumb, "thumb");
this.thumb = thumb;
return this;
}
/**
* The primary title of the media container.
*/
public Builder title1(String title1) {
Utils.checkNotNull(title1, "title1");
this.title1 = title1;
return this;
}
/**
* The secondary title of the media container.
*/
public Builder title2(String title2) {
Utils.checkNotNull(title2, "title2");
this.title2 = title2;
return this;
}
/**
* Identifier for the view group layout.
*/
public Builder viewGroup(String viewGroup) {
Utils.checkNotNull(viewGroup, "viewGroup");
this.viewGroup = viewGroup;
@@ -540,12 +601,10 @@ public class GetGenresLibraryMediaContainer {
public GetGenresLibraryMediaContainer build() {
return new GetGenresLibraryMediaContainer(
size,
offset,
totalSize,
identifier,
allowSync,
art,
content,
identifier,
mediaTagPrefix,
mediaTagVersion,
nocache,

View File

@@ -7,11 +7,15 @@ package dev.plexapi.sdk.models.operations;
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.Boolean;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetLibraryItemsFilter {
@@ -31,23 +35,39 @@ public class GetLibraryItemsFilter {
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("advanced")
private Optional<Boolean> advanced;
@JsonCreator
public GetLibraryItemsFilter(
@JsonProperty("filter") String filter,
@JsonProperty("filterType") String filterType,
@JsonProperty("key") String key,
@JsonProperty("title") String title,
@JsonProperty("type") String type) {
@JsonProperty("type") String type,
@JsonProperty("advanced") Optional<Boolean> advanced) {
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(filterType, "filterType");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(advanced, "advanced");
this.filter = filter;
this.filterType = filterType;
this.key = key;
this.title = title;
this.type = type;
this.advanced = advanced;
}
public GetLibraryItemsFilter(
String filter,
String filterType,
String key,
String title,
String type) {
this(filter, filterType, key, title, type, Optional.empty());
}
@JsonIgnore
@@ -75,6 +95,11 @@ public class GetLibraryItemsFilter {
return type;
}
@JsonIgnore
public Optional<Boolean> advanced() {
return advanced;
}
public final static Builder builder() {
return new Builder();
}
@@ -108,6 +133,18 @@ public class GetLibraryItemsFilter {
this.type = type;
return this;
}
public GetLibraryItemsFilter withAdvanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public GetLibraryItemsFilter withAdvanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -123,7 +160,8 @@ public class GetLibraryItemsFilter {
Objects.deepEquals(this.filterType, other.filterType) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.type, other.type);
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.advanced, other.advanced);
}
@Override
@@ -133,7 +171,8 @@ public class GetLibraryItemsFilter {
filterType,
key,
title,
type);
type,
advanced);
}
@Override
@@ -143,7 +182,8 @@ public class GetLibraryItemsFilter {
"filterType", filterType,
"key", key,
"title", title,
"type", type);
"type", type,
"advanced", advanced);
}
public final static class Builder {
@@ -156,7 +196,9 @@ public class GetLibraryItemsFilter {
private String title;
private String type;
private String type;
private Optional<Boolean> advanced = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -191,6 +233,18 @@ public class GetLibraryItemsFilter {
this.type = type;
return this;
}
public Builder advanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public Builder advanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
public GetLibraryItemsFilter build() {
return new GetLibraryItemsFilter(
@@ -198,7 +252,8 @@ public class GetLibraryItemsFilter {
filterType,
key,
title,
type);
type,
advanced);
}
}
}

View File

@@ -17,7 +17,9 @@ public enum GetLibraryItemsLibraryType {
Movie("movie"),
TvShow("show"),
Season("season"),
Episode("episode");
Episode("episode"),
Artist("artist"),
Album("album");
@JsonValue
private final String value;

View File

@@ -28,6 +28,10 @@ public class GetLibraryItemsType {
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("subtype")
private Optional<String> subtype;
@JsonProperty("title")
private String title;
@@ -50,6 +54,7 @@ public class GetLibraryItemsType {
public GetLibraryItemsType(
@JsonProperty("key") String key,
@JsonProperty("type") String type,
@JsonProperty("subtype") Optional<String> subtype,
@JsonProperty("title") String title,
@JsonProperty("active") boolean active,
@JsonProperty("Filter") Optional<? extends List<GetLibraryItemsFilter>> filter,
@@ -57,6 +62,7 @@ public class GetLibraryItemsType {
@JsonProperty("Field") Optional<? extends List<GetLibraryItemsField>> field) {
Utils.checkNotNull(key, "key");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(subtype, "subtype");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(active, "active");
Utils.checkNotNull(filter, "filter");
@@ -64,6 +70,7 @@ public class GetLibraryItemsType {
Utils.checkNotNull(field, "field");
this.key = key;
this.type = type;
this.subtype = subtype;
this.title = title;
this.active = active;
this.filter = filter;
@@ -76,7 +83,7 @@ public class GetLibraryItemsType {
String type,
String title,
boolean active) {
this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty());
this(key, type, Optional.empty(), title, active, Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
@@ -89,6 +96,11 @@ public class GetLibraryItemsType {
return type;
}
@JsonIgnore
public Optional<String> subtype() {
return subtype;
}
@JsonIgnore
public String title() {
return title;
@@ -133,6 +145,18 @@ public class GetLibraryItemsType {
return this;
}
public GetLibraryItemsType withSubtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public GetLibraryItemsType withSubtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public GetLibraryItemsType withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
@@ -193,6 +217,7 @@ public class GetLibraryItemsType {
return
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.subtype, other.subtype) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.active, other.active) &&
Objects.deepEquals(this.filter, other.filter) &&
@@ -205,6 +230,7 @@ public class GetLibraryItemsType {
return Objects.hash(
key,
type,
subtype,
title,
active,
filter,
@@ -217,6 +243,7 @@ public class GetLibraryItemsType {
return Utils.toString(GetLibraryItemsType.class,
"key", key,
"type", type,
"subtype", subtype,
"title", title,
"active", active,
"filter", filter,
@@ -230,6 +257,8 @@ public class GetLibraryItemsType {
private String type;
private Optional<String> subtype = Optional.empty();
private String title;
private Boolean active;
@@ -256,6 +285,18 @@ public class GetLibraryItemsType {
return this;
}
public Builder subtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public Builder subtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
@@ -308,6 +349,7 @@ public class GetLibraryItemsType {
return new GetLibraryItemsType(
key,
type,
subtype,
title,
active,
filter,

View File

@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Long;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -21,7 +21,7 @@ public class GetMediaMetaDataCountry {
* The unique country identifier.
*/
@JsonProperty("id")
private long id;
private int id;
/**
* The filter string for the country.
@@ -37,7 +37,7 @@ public class GetMediaMetaDataCountry {
@JsonCreator
public GetMediaMetaDataCountry(
@JsonProperty("id") long id,
@JsonProperty("id") int id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag) {
Utils.checkNotNull(id, "id");
@@ -52,7 +52,7 @@ public class GetMediaMetaDataCountry {
* The unique country identifier.
*/
@JsonIgnore
public long id() {
public int id() {
return id;
}
@@ -79,7 +79,7 @@ public class GetMediaMetaDataCountry {
/**
* The unique country identifier.
*/
public GetMediaMetaDataCountry withId(long id) {
public GetMediaMetaDataCountry withId(int id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
@@ -136,7 +136,7 @@ public class GetMediaMetaDataCountry {
public final static class Builder {
private Long id;
private Integer id;
private String filter;
@@ -149,7 +149,7 @@ public class GetMediaMetaDataCountry {
/**
* The unique country identifier.
*/
public Builder id(long id) {
public Builder id(int id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
public class GetMediaMetaDataGuids {
/**
* The GUID value.
*/
@JsonProperty("id")
private String id;
@JsonCreator
public GetMediaMetaDataGuids(
@JsonProperty("id") String id) {
Utils.checkNotNull(id, "id");
this.id = id;
}
/**
* The GUID value.
*/
@JsonIgnore
public String id() {
return id;
}
public final static Builder builder() {
return new Builder();
}
/**
* The GUID value.
*/
public GetMediaMetaDataGuids withId(String id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaMetaDataGuids other = (GetMediaMetaDataGuids) o;
return
Objects.deepEquals(this.id, other.id);
}
@Override
public int hashCode() {
return Objects.hash(
id);
}
@Override
public String toString() {
return Utils.toString(GetMediaMetaDataGuids.class,
"id", id);
}
public final static class Builder {
private String id;
private Builder() {
// force use of static builder() method
}
/**
* The GUID value.
*/
public Builder id(String id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public GetMediaMetaDataGuids build() {
return new GetMediaMetaDataGuids(
id);
}
}
}

View File

@@ -0,0 +1,38 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
/**
* GetMediaMetaDataHasThumbnail - Indicates if the part has a thumbnail.
*/
public enum GetMediaMetaDataHasThumbnail {
False("0"),
True("1");
@JsonValue
private final String value;
private GetMediaMetaDataHasThumbnail(String value) {
this.value = value;
}
public String value() {
return value;
}
public static Optional<GetMediaMetaDataHasThumbnail> fromValue(String value) {
for (GetMediaMetaDataHasThumbnail o: GetMediaMetaDataHasThumbnail.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import dev.plexapi.sdk.utils.OneOfDeserializer;
import dev.plexapi.sdk.utils.TypedObject;
import dev.plexapi.sdk.utils.Utils.JsonShape;
import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
/**
* GetMediaMetaDataLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonDeserialize(using = GetMediaMetaDataLibraryOptimizedForStreaming._Deserializer.class)
public class GetMediaMetaDataLibraryOptimizedForStreaming {
@JsonValue
private TypedObject value;
private GetMediaMetaDataLibraryOptimizedForStreaming(TypedObject value) {
this.value = value;
}
public static GetMediaMetaDataLibraryOptimizedForStreaming of(GetMediaMetaDataOptimizedForStreaming1 value) {
Utils.checkNotNull(value, "value");
return new GetMediaMetaDataLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<GetMediaMetaDataOptimizedForStreaming1>(){}));
}
public static GetMediaMetaDataLibraryOptimizedForStreaming of(boolean value) {
Utils.checkNotNull(value, "value");
return new GetMediaMetaDataLibraryOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
}
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.GetMediaMetaDataOptimizedForStreaming1}</li>
* <li>{@code boolean}</li>
* </ul>
*
* <p>Use {@code instanceof} to determine what type is returned. For example:
*
* <pre>
* if (obj.value() instanceof String) {
* String answer = (String) obj.value();
* System.out.println("answer=" + answer);
* }
* </pre>
*
* @return value of oneOf type
**/
public java.lang.Object value() {
return value.value();
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaMetaDataLibraryOptimizedForStreaming other = (GetMediaMetaDataLibraryOptimizedForStreaming) o;
return Objects.deepEquals(this.value.value(), other.value.value());
}
@Override
public int hashCode() {
return Objects.hash(value.value());
}
@SuppressWarnings("serial")
public static final class _Deserializer extends OneOfDeserializer<GetMediaMetaDataLibraryOptimizedForStreaming> {
public _Deserializer() {
super(GetMediaMetaDataLibraryOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<GetMediaMetaDataOptimizedForStreaming1>() {}, JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(GetMediaMetaDataLibraryOptimizedForStreaming.class,
"value", value);
}
}

View File

@@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
@@ -23,8 +23,11 @@ import java.util.Optional;
public class GetMediaMetaDataMediaContainer {
/**
* Number of media items returned in this response.
*/
@JsonProperty("size")
private double size;
private int size;
/**
* Indicates whether syncing is allowed.
@@ -77,7 +80,7 @@ public class GetMediaMetaDataMediaContainer {
@JsonCreator
public GetMediaMetaDataMediaContainer(
@JsonProperty("size") double size,
@JsonProperty("size") int size,
@JsonProperty("allowSync") boolean allowSync,
@JsonProperty("identifier") String identifier,
@JsonProperty("librarySectionID") long librarySectionID,
@@ -107,7 +110,7 @@ public class GetMediaMetaDataMediaContainer {
}
public GetMediaMetaDataMediaContainer(
double size,
int size,
boolean allowSync,
String identifier,
long librarySectionID,
@@ -118,8 +121,11 @@ public class GetMediaMetaDataMediaContainer {
this(size, allowSync, identifier, librarySectionID, librarySectionTitle, Optional.empty(), mediaTagPrefix, mediaTagVersion, metadata);
}
/**
* Number of media items returned in this response.
*/
@JsonIgnore
public double size() {
public int size() {
return size;
}
@@ -191,7 +197,10 @@ public class GetMediaMetaDataMediaContainer {
return new Builder();
}
public GetMediaMetaDataMediaContainer withSize(double size) {
/**
* Number of media items returned in this response.
*/
public GetMediaMetaDataMediaContainer withSize(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
@@ -329,7 +338,7 @@ public class GetMediaMetaDataMediaContainer {
public final static class Builder {
private Double size;
private Integer size;
private Boolean allowSync;
@@ -351,7 +360,10 @@ public class GetMediaMetaDataMediaContainer {
// force use of static builder() method
}
public Builder size(double size) {
/**
* Number of media items returned in this response.
*/
public Builder size(int size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;

View File

@@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
@@ -145,8 +146,9 @@ public class GetMediaMetaDataMetadata {
/**
* The content rating (e.g., TV-MA).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("contentRating")
private String contentRating;
private Optional<String> contentRating;
/**
* A summary of the content.
@@ -178,8 +180,9 @@ public class GetMediaMetaDataMetadata {
/**
* The audience rating for the content.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audienceRating")
private float audienceRating;
private Optional<Float> audienceRating;
/**
* The number of times the item has been viewed.
@@ -206,7 +209,21 @@ public class GetMediaMetaDataMetadata {
* The release year.
*/
@JsonProperty("year")
private long year;
private int year;
/**
* The general rating
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("rating")
private Optional<Float> rating;
/**
* The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("ratingImage")
private Optional<String> ratingImage;
/**
* The tagline of the content.
@@ -246,13 +263,14 @@ public class GetMediaMetaDataMetadata {
* Duration of the content in milliseconds.
*/
@JsonProperty("duration")
private long duration;
private int duration;
/**
* The original release date.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("originallyAvailableAt")
private LocalDate originallyAvailableAt;
private Optional<LocalDate> originallyAvailableAt;
/**
* The total number of episodes (or leaves).
@@ -273,25 +291,20 @@ public class GetMediaMetaDataMetadata {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("childCount")
private Optional<Long> childCount;
private Optional<Integer> childCount;
/**
* Unix timestamp when the item was added.
*/
@JsonProperty("addedAt")
private long addedAt;
/**
* Unix timestamp when the item was last updated.
*/
@JsonProperty("updatedAt")
private long updatedAt;
/**
* The URL for the audience rating image.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audienceRatingImage")
private String audienceRatingImage;
private Optional<String> audienceRatingImage;
/**
* The index number of the parent entity, which could indicate its order or position.
@@ -351,14 +364,16 @@ public class GetMediaMetaDataMetadata {
/**
* An array of GUID objects.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Guid")
private List<Guids> guids;
private Optional<? extends List<GetMediaMetaDataGuids>> guids;
/**
* An array of rating objects.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Rating")
private List<Rating> rating;
private Optional<? extends List<Ratings>> ratings;
/**
* An array of Actor roles.
@@ -422,30 +437,32 @@ public class GetMediaMetaDataMetadata {
@JsonProperty("librarySectionTitle") String librarySectionTitle,
@JsonProperty("librarySectionID") long librarySectionID,
@JsonProperty("librarySectionKey") String librarySectionKey,
@JsonProperty("contentRating") String contentRating,
@JsonProperty("contentRating") Optional<String> contentRating,
@JsonProperty("summary") String summary,
@JsonProperty("index") Optional<Long> index,
@JsonProperty("grandparentTitle") Optional<String> grandparentTitle,
@JsonProperty("parentTitle") Optional<String> parentTitle,
@JsonProperty("audienceRating") float audienceRating,
@JsonProperty("audienceRating") Optional<Float> audienceRating,
@JsonProperty("viewCount") Optional<Long> viewCount,
@JsonProperty("skipCount") Optional<Long> skipCount,
@JsonProperty("lastViewedAt") Optional<Long> lastViewedAt,
@JsonProperty("year") long year,
@JsonProperty("year") int year,
@JsonProperty("rating") Optional<Float> rating,
@JsonProperty("ratingImage") Optional<String> ratingImage,
@JsonProperty("tagline") Optional<String> tagline,
@JsonProperty("chapterSource") Optional<String> chapterSource,
@JsonProperty("primaryExtraKey") Optional<String> primaryExtraKey,
@JsonProperty("thumb") String thumb,
@JsonProperty("art") String art,
@JsonProperty("theme") Optional<String> theme,
@JsonProperty("duration") long duration,
@JsonProperty("originallyAvailableAt") LocalDate originallyAvailableAt,
@JsonProperty("duration") int duration,
@JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
@JsonProperty("leafCount") Optional<Long> leafCount,
@JsonProperty("viewedLeafCount") Optional<Long> viewedLeafCount,
@JsonProperty("childCount") Optional<Long> childCount,
@JsonProperty("childCount") Optional<Integer> childCount,
@JsonProperty("addedAt") long addedAt,
@JsonProperty("updatedAt") long updatedAt,
@JsonProperty("audienceRatingImage") String audienceRatingImage,
@JsonProperty("audienceRatingImage") Optional<String> audienceRatingImage,
@JsonProperty("parentIndex") Optional<Long> parentIndex,
@JsonProperty("parentThumb") Optional<String> parentThumb,
@JsonProperty("grandparentThumb") Optional<String> grandparentThumb,
@@ -455,8 +472,8 @@ public class GetMediaMetaDataMetadata {
@JsonProperty("UltraBlurColors") GetMediaMetaDataUltraBlurColors ultraBlurColors,
@JsonProperty("Genre") Optional<? extends List<GetMediaMetaDataGenre>> genre,
@JsonProperty("Country") Optional<? extends List<GetMediaMetaDataCountry>> country,
@JsonProperty("Guid") List<Guids> guids,
@JsonProperty("Rating") List<Rating> rating,
@JsonProperty("Guid") Optional<? extends List<GetMediaMetaDataGuids>> guids,
@JsonProperty("Rating") Optional<? extends List<Ratings>> ratings,
@JsonProperty("Role") Optional<? extends List<GetMediaMetaDataRole>> role,
@JsonProperty("Director") Optional<? extends List<GetMediaMetaDataDirector>> director,
@JsonProperty("Writer") Optional<? extends List<GetMediaMetaDataWriter>> writer,
@@ -491,6 +508,8 @@ public class GetMediaMetaDataMetadata {
Utils.checkNotNull(skipCount, "skipCount");
Utils.checkNotNull(lastViewedAt, "lastViewedAt");
Utils.checkNotNull(year, "year");
Utils.checkNotNull(rating, "rating");
Utils.checkNotNull(ratingImage, "ratingImage");
Utils.checkNotNull(tagline, "tagline");
Utils.checkNotNull(chapterSource, "chapterSource");
Utils.checkNotNull(primaryExtraKey, "primaryExtraKey");
@@ -515,7 +534,7 @@ public class GetMediaMetaDataMetadata {
Utils.checkNotNull(genre, "genre");
Utils.checkNotNull(country, "country");
Utils.checkNotNull(guids, "guids");
Utils.checkNotNull(rating, "rating");
Utils.checkNotNull(ratings, "ratings");
Utils.checkNotNull(role, "role");
Utils.checkNotNull(director, "director");
Utils.checkNotNull(writer, "writer");
@@ -550,6 +569,8 @@ public class GetMediaMetaDataMetadata {
this.skipCount = skipCount;
this.lastViewedAt = lastViewedAt;
this.year = year;
this.rating = rating;
this.ratingImage = ratingImage;
this.tagline = tagline;
this.chapterSource = chapterSource;
this.primaryExtraKey = primaryExtraKey;
@@ -574,7 +595,7 @@ public class GetMediaMetaDataMetadata {
this.genre = genre;
this.country = country;
this.guids = guids;
this.rating = rating;
this.ratings = ratings;
this.role = role;
this.director = director;
this.writer = writer;
@@ -592,22 +613,16 @@ public class GetMediaMetaDataMetadata {
String librarySectionTitle,
long librarySectionID,
String librarySectionKey,
String contentRating,
String summary,
float audienceRating,
long year,
int year,
String thumb,
String art,
long duration,
LocalDate originallyAvailableAt,
int duration,
long addedAt,
long updatedAt,
String audienceRatingImage,
List<GetMediaMetaDataImage> image,
GetMediaMetaDataUltraBlurColors ultraBlurColors,
List<Guids> guids,
List<Rating> rating) {
this(ratingKey, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, guid, Optional.empty(), Optional.empty(), type, title, Optional.empty(), librarySectionTitle, librarySectionID, librarySectionKey, contentRating, summary, Optional.empty(), Optional.empty(), Optional.empty(), audienceRating, Optional.empty(), Optional.empty(), Optional.empty(), year, Optional.empty(), Optional.empty(), Optional.empty(), thumb, art, Optional.empty(), duration, originallyAvailableAt, Optional.empty(), Optional.empty(), Optional.empty(), addedAt, updatedAt, audienceRatingImage, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), image, ultraBlurColors, Optional.empty(), Optional.empty(), guids, rating, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
GetMediaMetaDataUltraBlurColors ultraBlurColors) {
this(ratingKey, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, guid, Optional.empty(), Optional.empty(), type, title, Optional.empty(), librarySectionTitle, librarySectionID, librarySectionKey, Optional.empty(), summary, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), year, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), thumb, art, Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), addedAt, updatedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), image, ultraBlurColors, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -758,7 +773,7 @@ public class GetMediaMetaDataMetadata {
* The content rating (e.g., TV-MA).
*/
@JsonIgnore
public String contentRating() {
public Optional<String> contentRating() {
return contentRating;
}
@@ -798,7 +813,7 @@ public class GetMediaMetaDataMetadata {
* The audience rating for the content.
*/
@JsonIgnore
public float audienceRating() {
public Optional<Float> audienceRating() {
return audienceRating;
}
@@ -830,10 +845,26 @@ public class GetMediaMetaDataMetadata {
* The release year.
*/
@JsonIgnore
public long year() {
public int year() {
return year;
}
/**
* The general rating
*/
@JsonIgnore
public Optional<Float> rating() {
return rating;
}
/**
* The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
*/
@JsonIgnore
public Optional<String> ratingImage() {
return ratingImage;
}
/**
* The tagline of the content.
*/
@@ -880,7 +911,7 @@ public class GetMediaMetaDataMetadata {
* Duration of the content in milliseconds.
*/
@JsonIgnore
public long duration() {
public int duration() {
return duration;
}
@@ -888,7 +919,7 @@ public class GetMediaMetaDataMetadata {
* The original release date.
*/
@JsonIgnore
public LocalDate originallyAvailableAt() {
public Optional<LocalDate> originallyAvailableAt() {
return originallyAvailableAt;
}
@@ -912,21 +943,15 @@ public class GetMediaMetaDataMetadata {
* The number of child items.
*/
@JsonIgnore
public Optional<Long> childCount() {
public Optional<Integer> childCount() {
return childCount;
}
/**
* Unix timestamp when the item was added.
*/
@JsonIgnore
public long addedAt() {
return addedAt;
}
/**
* Unix timestamp when the item was last updated.
*/
@JsonIgnore
public long updatedAt() {
return updatedAt;
@@ -936,7 +961,7 @@ public class GetMediaMetaDataMetadata {
* The URL for the audience rating image.
*/
@JsonIgnore
public String audienceRatingImage() {
public Optional<String> audienceRatingImage() {
return audienceRatingImage;
}
@@ -1012,17 +1037,19 @@ public class GetMediaMetaDataMetadata {
/**
* An array of GUID objects.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public List<Guids> guids() {
return guids;
public Optional<List<GetMediaMetaDataGuids>> guids() {
return (Optional<List<GetMediaMetaDataGuids>>) guids;
}
/**
* An array of rating objects.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public List<Rating> rating() {
return rating;
public Optional<List<Ratings>> ratings() {
return (Optional<List<Ratings>>) ratings;
}
/**
@@ -1339,6 +1366,15 @@ public class GetMediaMetaDataMetadata {
* The content rating (e.g., TV-MA).
*/
public GetMediaMetaDataMetadata withContentRating(String contentRating) {
Utils.checkNotNull(contentRating, "contentRating");
this.contentRating = Optional.ofNullable(contentRating);
return this;
}
/**
* The content rating (e.g., TV-MA).
*/
public GetMediaMetaDataMetadata withContentRating(Optional<String> contentRating) {
Utils.checkNotNull(contentRating, "contentRating");
this.contentRating = contentRating;
return this;
@@ -1411,6 +1447,15 @@ public class GetMediaMetaDataMetadata {
* The audience rating for the content.
*/
public GetMediaMetaDataMetadata withAudienceRating(float audienceRating) {
Utils.checkNotNull(audienceRating, "audienceRating");
this.audienceRating = Optional.ofNullable(audienceRating);
return this;
}
/**
* The audience rating for the content.
*/
public GetMediaMetaDataMetadata withAudienceRating(Optional<Float> audienceRating) {
Utils.checkNotNull(audienceRating, "audienceRating");
this.audienceRating = audienceRating;
return this;
@@ -1473,12 +1518,48 @@ public class GetMediaMetaDataMetadata {
/**
* The release year.
*/
public GetMediaMetaDataMetadata withYear(long year) {
public GetMediaMetaDataMetadata withYear(int year) {
Utils.checkNotNull(year, "year");
this.year = year;
return this;
}
/**
* The general rating
*/
public GetMediaMetaDataMetadata withRating(float rating) {
Utils.checkNotNull(rating, "rating");
this.rating = Optional.ofNullable(rating);
return this;
}
/**
* The general rating
*/
public GetMediaMetaDataMetadata withRating(Optional<Float> rating) {
Utils.checkNotNull(rating, "rating");
this.rating = rating;
return this;
}
/**
* The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
*/
public GetMediaMetaDataMetadata withRatingImage(String ratingImage) {
Utils.checkNotNull(ratingImage, "ratingImage");
this.ratingImage = Optional.ofNullable(ratingImage);
return this;
}
/**
* The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
*/
public GetMediaMetaDataMetadata withRatingImage(Optional<String> ratingImage) {
Utils.checkNotNull(ratingImage, "ratingImage");
this.ratingImage = ratingImage;
return this;
}
/**
* The tagline of the content.
*/
@@ -1560,7 +1641,7 @@ public class GetMediaMetaDataMetadata {
/**
* Duration of the content in milliseconds.
*/
public GetMediaMetaDataMetadata withDuration(long duration) {
public GetMediaMetaDataMetadata withDuration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
@@ -1570,6 +1651,15 @@ public class GetMediaMetaDataMetadata {
* The original release date.
*/
public GetMediaMetaDataMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) {
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
return this;
}
/**
* The original release date.
*/
public GetMediaMetaDataMetadata withOriginallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
this.originallyAvailableAt = originallyAvailableAt;
return this;
@@ -1614,7 +1704,7 @@ public class GetMediaMetaDataMetadata {
/**
* The number of child items.
*/
public GetMediaMetaDataMetadata withChildCount(long childCount) {
public GetMediaMetaDataMetadata withChildCount(int childCount) {
Utils.checkNotNull(childCount, "childCount");
this.childCount = Optional.ofNullable(childCount);
return this;
@@ -1623,24 +1713,18 @@ public class GetMediaMetaDataMetadata {
/**
* The number of child items.
*/
public GetMediaMetaDataMetadata withChildCount(Optional<Long> childCount) {
public GetMediaMetaDataMetadata withChildCount(Optional<Integer> childCount) {
Utils.checkNotNull(childCount, "childCount");
this.childCount = childCount;
return this;
}
/**
* Unix timestamp when the item was added.
*/
public GetMediaMetaDataMetadata withAddedAt(long addedAt) {
Utils.checkNotNull(addedAt, "addedAt");
this.addedAt = addedAt;
return this;
}
/**
* Unix timestamp when the item was last updated.
*/
public GetMediaMetaDataMetadata withUpdatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
@@ -1651,6 +1735,15 @@ public class GetMediaMetaDataMetadata {
* The URL for the audience rating image.
*/
public GetMediaMetaDataMetadata withAudienceRatingImage(String audienceRatingImage) {
Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
this.audienceRatingImage = Optional.ofNullable(audienceRatingImage);
return this;
}
/**
* The URL for the audience rating image.
*/
public GetMediaMetaDataMetadata withAudienceRatingImage(Optional<String> audienceRatingImage) {
Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
this.audienceRatingImage = audienceRatingImage;
return this;
@@ -1794,7 +1887,16 @@ public class GetMediaMetaDataMetadata {
/**
* An array of GUID objects.
*/
public GetMediaMetaDataMetadata withGuids(List<Guids> guids) {
public GetMediaMetaDataMetadata withGuids(List<GetMediaMetaDataGuids> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = Optional.ofNullable(guids);
return this;
}
/**
* An array of GUID objects.
*/
public GetMediaMetaDataMetadata withGuids(Optional<? extends List<GetMediaMetaDataGuids>> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = guids;
return this;
@@ -1803,9 +1905,18 @@ public class GetMediaMetaDataMetadata {
/**
* An array of rating objects.
*/
public GetMediaMetaDataMetadata withRating(List<Rating> rating) {
Utils.checkNotNull(rating, "rating");
this.rating = rating;
public GetMediaMetaDataMetadata withRatings(List<Ratings> ratings) {
Utils.checkNotNull(ratings, "ratings");
this.ratings = Optional.ofNullable(ratings);
return this;
}
/**
* An array of rating objects.
*/
public GetMediaMetaDataMetadata withRatings(Optional<? extends List<Ratings>> ratings) {
Utils.checkNotNull(ratings, "ratings");
this.ratings = ratings;
return this;
}
@@ -1955,6 +2066,8 @@ public class GetMediaMetaDataMetadata {
Objects.deepEquals(this.skipCount, other.skipCount) &&
Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
Objects.deepEquals(this.year, other.year) &&
Objects.deepEquals(this.rating, other.rating) &&
Objects.deepEquals(this.ratingImage, other.ratingImage) &&
Objects.deepEquals(this.tagline, other.tagline) &&
Objects.deepEquals(this.chapterSource, other.chapterSource) &&
Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) &&
@@ -1979,7 +2092,7 @@ public class GetMediaMetaDataMetadata {
Objects.deepEquals(this.genre, other.genre) &&
Objects.deepEquals(this.country, other.country) &&
Objects.deepEquals(this.guids, other.guids) &&
Objects.deepEquals(this.rating, other.rating) &&
Objects.deepEquals(this.ratings, other.ratings) &&
Objects.deepEquals(this.role, other.role) &&
Objects.deepEquals(this.director, other.director) &&
Objects.deepEquals(this.writer, other.writer) &&
@@ -2019,6 +2132,8 @@ public class GetMediaMetaDataMetadata {
skipCount,
lastViewedAt,
year,
rating,
ratingImage,
tagline,
chapterSource,
primaryExtraKey,
@@ -2043,7 +2158,7 @@ public class GetMediaMetaDataMetadata {
genre,
country,
guids,
rating,
ratings,
role,
director,
writer,
@@ -2083,6 +2198,8 @@ public class GetMediaMetaDataMetadata {
"skipCount", skipCount,
"lastViewedAt", lastViewedAt,
"year", year,
"rating", rating,
"ratingImage", ratingImage,
"tagline", tagline,
"chapterSource", chapterSource,
"primaryExtraKey", primaryExtraKey,
@@ -2107,7 +2224,7 @@ public class GetMediaMetaDataMetadata {
"genre", genre,
"country", country,
"guids", guids,
"rating", rating,
"ratings", ratings,
"role", role,
"director", director,
"writer", writer,
@@ -2154,7 +2271,7 @@ public class GetMediaMetaDataMetadata {
private String librarySectionKey;
private String contentRating;
private Optional<String> contentRating = Optional.empty();
private String summary;
@@ -2164,7 +2281,7 @@ public class GetMediaMetaDataMetadata {
private Optional<String> parentTitle = Optional.empty();
private Float audienceRating;
private Optional<Float> audienceRating = Optional.empty();
private Optional<Long> viewCount = Optional.empty();
@@ -2172,7 +2289,11 @@ public class GetMediaMetaDataMetadata {
private Optional<Long> lastViewedAt = Optional.empty();
private Long year;
private Integer year;
private Optional<Float> rating = Optional.empty();
private Optional<String> ratingImage = Optional.empty();
private Optional<String> tagline = Optional.empty();
@@ -2186,21 +2307,21 @@ public class GetMediaMetaDataMetadata {
private Optional<String> theme = Optional.empty();
private Long duration;
private Integer duration;
private LocalDate originallyAvailableAt;
private Optional<LocalDate> originallyAvailableAt = Optional.empty();
private Optional<Long> leafCount = Optional.empty();
private Optional<Long> viewedLeafCount = Optional.empty();
private Optional<Long> childCount = Optional.empty();
private Optional<Integer> childCount = Optional.empty();
private Long addedAt;
private Long updatedAt;
private String audienceRatingImage;
private Optional<String> audienceRatingImage = Optional.empty();
private Optional<Long> parentIndex = Optional.empty();
@@ -2220,9 +2341,9 @@ public class GetMediaMetaDataMetadata {
private Optional<? extends List<GetMediaMetaDataCountry>> country = Optional.empty();
private List<Guids> guids;
private Optional<? extends List<GetMediaMetaDataGuids>> guids = Optional.empty();
private List<Rating> rating;
private Optional<? extends List<Ratings>> ratings = Optional.empty();
private Optional<? extends List<GetMediaMetaDataRole>> role = Optional.empty();
@@ -2496,6 +2617,15 @@ public class GetMediaMetaDataMetadata {
* The content rating (e.g., TV-MA).
*/
public Builder contentRating(String contentRating) {
Utils.checkNotNull(contentRating, "contentRating");
this.contentRating = Optional.ofNullable(contentRating);
return this;
}
/**
* The content rating (e.g., TV-MA).
*/
public Builder contentRating(Optional<String> contentRating) {
Utils.checkNotNull(contentRating, "contentRating");
this.contentRating = contentRating;
return this;
@@ -2568,6 +2698,15 @@ public class GetMediaMetaDataMetadata {
* The audience rating for the content.
*/
public Builder audienceRating(float audienceRating) {
Utils.checkNotNull(audienceRating, "audienceRating");
this.audienceRating = Optional.ofNullable(audienceRating);
return this;
}
/**
* The audience rating for the content.
*/
public Builder audienceRating(Optional<Float> audienceRating) {
Utils.checkNotNull(audienceRating, "audienceRating");
this.audienceRating = audienceRating;
return this;
@@ -2630,12 +2769,48 @@ public class GetMediaMetaDataMetadata {
/**
* The release year.
*/
public Builder year(long year) {
public Builder year(int year) {
Utils.checkNotNull(year, "year");
this.year = year;
return this;
}
/**
* The general rating
*/
public Builder rating(float rating) {
Utils.checkNotNull(rating, "rating");
this.rating = Optional.ofNullable(rating);
return this;
}
/**
* The general rating
*/
public Builder rating(Optional<Float> rating) {
Utils.checkNotNull(rating, "rating");
this.rating = rating;
return this;
}
/**
* The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
*/
public Builder ratingImage(String ratingImage) {
Utils.checkNotNull(ratingImage, "ratingImage");
this.ratingImage = Optional.ofNullable(ratingImage);
return this;
}
/**
* The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
*/
public Builder ratingImage(Optional<String> ratingImage) {
Utils.checkNotNull(ratingImage, "ratingImage");
this.ratingImage = ratingImage;
return this;
}
/**
* The tagline of the content.
*/
@@ -2717,7 +2892,7 @@ public class GetMediaMetaDataMetadata {
/**
* Duration of the content in milliseconds.
*/
public Builder duration(long duration) {
public Builder duration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
@@ -2727,6 +2902,15 @@ public class GetMediaMetaDataMetadata {
* The original release date.
*/
public Builder originallyAvailableAt(LocalDate originallyAvailableAt) {
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
return this;
}
/**
* The original release date.
*/
public Builder originallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
this.originallyAvailableAt = originallyAvailableAt;
return this;
@@ -2771,7 +2955,7 @@ public class GetMediaMetaDataMetadata {
/**
* The number of child items.
*/
public Builder childCount(long childCount) {
public Builder childCount(int childCount) {
Utils.checkNotNull(childCount, "childCount");
this.childCount = Optional.ofNullable(childCount);
return this;
@@ -2780,24 +2964,18 @@ public class GetMediaMetaDataMetadata {
/**
* The number of child items.
*/
public Builder childCount(Optional<Long> childCount) {
public Builder childCount(Optional<Integer> childCount) {
Utils.checkNotNull(childCount, "childCount");
this.childCount = childCount;
return this;
}
/**
* Unix timestamp when the item was added.
*/
public Builder addedAt(long addedAt) {
Utils.checkNotNull(addedAt, "addedAt");
this.addedAt = addedAt;
return this;
}
/**
* Unix timestamp when the item was last updated.
*/
public Builder updatedAt(long updatedAt) {
Utils.checkNotNull(updatedAt, "updatedAt");
this.updatedAt = updatedAt;
@@ -2808,6 +2986,15 @@ public class GetMediaMetaDataMetadata {
* The URL for the audience rating image.
*/
public Builder audienceRatingImage(String audienceRatingImage) {
Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
this.audienceRatingImage = Optional.ofNullable(audienceRatingImage);
return this;
}
/**
* The URL for the audience rating image.
*/
public Builder audienceRatingImage(Optional<String> audienceRatingImage) {
Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
this.audienceRatingImage = audienceRatingImage;
return this;
@@ -2951,7 +3138,16 @@ public class GetMediaMetaDataMetadata {
/**
* An array of GUID objects.
*/
public Builder guids(List<Guids> guids) {
public Builder guids(List<GetMediaMetaDataGuids> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = Optional.ofNullable(guids);
return this;
}
/**
* An array of GUID objects.
*/
public Builder guids(Optional<? extends List<GetMediaMetaDataGuids>> guids) {
Utils.checkNotNull(guids, "guids");
this.guids = guids;
return this;
@@ -2960,9 +3156,18 @@ public class GetMediaMetaDataMetadata {
/**
* An array of rating objects.
*/
public Builder rating(List<Rating> rating) {
Utils.checkNotNull(rating, "rating");
this.rating = rating;
public Builder ratings(List<Ratings> ratings) {
Utils.checkNotNull(ratings, "ratings");
this.ratings = Optional.ofNullable(ratings);
return this;
}
/**
* An array of rating objects.
*/
public Builder ratings(Optional<? extends List<Ratings>> ratings) {
Utils.checkNotNull(ratings, "ratings");
this.ratings = ratings;
return this;
}
@@ -3104,6 +3309,8 @@ public class GetMediaMetaDataMetadata {
skipCount,
lastViewedAt,
year,
rating,
ratingImage,
tagline,
chapterSource,
primaryExtraKey,
@@ -3128,7 +3335,7 @@ public class GetMediaMetaDataMetadata {
genre,
country,
guids,
rating,
ratings,
role,
director,
writer,

View File

@@ -0,0 +1,101 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import dev.plexapi.sdk.utils.OneOfDeserializer;
import dev.plexapi.sdk.utils.TypedObject;
import dev.plexapi.sdk.utils.Utils.JsonShape;
import dev.plexapi.sdk.utils.Utils.TypeReferenceWithShape;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Objects;
/**
* GetMediaMetaDataOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonDeserialize(using = GetMediaMetaDataOptimizedForStreaming._Deserializer.class)
public class GetMediaMetaDataOptimizedForStreaming {
@JsonValue
private TypedObject value;
private GetMediaMetaDataOptimizedForStreaming(TypedObject value) {
this.value = value;
}
public static GetMediaMetaDataOptimizedForStreaming of(OptimizedForStreaming1 value) {
Utils.checkNotNull(value, "value");
return new GetMediaMetaDataOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<OptimizedForStreaming1>(){}));
}
public static GetMediaMetaDataOptimizedForStreaming of(boolean value) {
Utils.checkNotNull(value, "value");
return new GetMediaMetaDataOptimizedForStreaming(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<java.lang.Boolean>(){}));
}
/**
* Returns an instance of one of these types:
* <ul>
* <li>{@code dev.plexapi.sdk.models.operations.OptimizedForStreaming1}</li>
* <li>{@code boolean}</li>
* </ul>
*
* <p>Use {@code instanceof} to determine what type is returned. For example:
*
* <pre>
* if (obj.value() instanceof String) {
* String answer = (String) obj.value();
* System.out.println("answer=" + answer);
* }
* </pre>
*
* @return value of oneOf type
**/
public java.lang.Object value() {
return value.value();
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaMetaDataOptimizedForStreaming other = (GetMediaMetaDataOptimizedForStreaming) o;
return Objects.deepEquals(this.value.value(), other.value.value());
}
@Override
public int hashCode() {
return Objects.hash(value.value());
}
@SuppressWarnings("serial")
public static final class _Deserializer extends OneOfDeserializer<GetMediaMetaDataOptimizedForStreaming> {
public _Deserializer() {
super(GetMediaMetaDataOptimizedForStreaming.class, false,
TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference<OptimizedForStreaming1>() {}, JsonShape.DEFAULT));
}
}
@Override
public String toString() {
return Utils.toString(GetMediaMetaDataOptimizedForStreaming.class,
"value", value);
}
}

View File

@@ -0,0 +1,34 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
public enum GetMediaMetaDataOptimizedForStreaming1 {
ZERO(0),
ONE(1);
@JsonValue
private final int value;
private GetMediaMetaDataOptimizedForStreaming1(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetMediaMetaDataOptimizedForStreaming1> fromValue(int value) {
for (GetMediaMetaDataOptimizedForStreaming1 o: GetMediaMetaDataOptimizedForStreaming1.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -10,11 +10,15 @@ 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 com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.utils.LazySingletonValue;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
@@ -55,8 +59,9 @@ public class GetMediaMetaDataPart {
/**
* Duration of the part in milliseconds.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("duration")
private long duration;
private Optional<Integer> duration;
/**
* File path for the part.
@@ -70,23 +75,52 @@ public class GetMediaMetaDataPart {
@JsonProperty("size")
private long size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("packetLength")
private Optional<Integer> packetLength;
/**
* Container format of the part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("container")
private String container;
private Optional<String> container;
/**
* Video profile for the part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("videoProfile")
private String videoProfile;
private Optional<String> videoProfile;
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("audioProfile")
private Optional<String> audioProfile;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("has64bitOffsets")
private Optional<Boolean> has64bitOffsets;
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("optimizedForStreaming")
private Optional<? extends GetMediaMetaDataLibraryOptimizedForStreaming> optimizedForStreaming;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("hasThumbnail")
private Optional<? extends GetMediaMetaDataHasThumbnail> hasThumbnail;
/**
* An array of streams for this part.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Stream")
private List<GetMediaMetaDataStream> stream;
private Optional<? extends List<GetMediaMetaDataStream>> stream;
@JsonCreator
public GetMediaMetaDataPart(
@@ -95,12 +129,17 @@ public class GetMediaMetaDataPart {
@JsonProperty("id") long id,
@JsonProperty("key") String key,
@JsonProperty("indexes") Optional<String> indexes,
@JsonProperty("duration") long duration,
@JsonProperty("duration") Optional<Integer> duration,
@JsonProperty("file") String file,
@JsonProperty("size") long size,
@JsonProperty("container") String container,
@JsonProperty("videoProfile") String videoProfile,
@JsonProperty("Stream") List<GetMediaMetaDataStream> stream) {
@JsonProperty("packetLength") Optional<Integer> packetLength,
@JsonProperty("container") Optional<String> container,
@JsonProperty("videoProfile") Optional<String> videoProfile,
@JsonProperty("audioProfile") Optional<String> audioProfile,
@JsonProperty("has64bitOffsets") Optional<Boolean> has64bitOffsets,
@JsonProperty("optimizedForStreaming") Optional<? extends GetMediaMetaDataLibraryOptimizedForStreaming> optimizedForStreaming,
@JsonProperty("hasThumbnail") Optional<? extends GetMediaMetaDataHasThumbnail> hasThumbnail,
@JsonProperty("Stream") Optional<? extends List<GetMediaMetaDataStream>> stream) {
Utils.checkNotNull(accessible, "accessible");
Utils.checkNotNull(exists, "exists");
Utils.checkNotNull(id, "id");
@@ -109,8 +148,13 @@ public class GetMediaMetaDataPart {
Utils.checkNotNull(duration, "duration");
Utils.checkNotNull(file, "file");
Utils.checkNotNull(size, "size");
Utils.checkNotNull(packetLength, "packetLength");
Utils.checkNotNull(container, "container");
Utils.checkNotNull(videoProfile, "videoProfile");
Utils.checkNotNull(audioProfile, "audioProfile");
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
Utils.checkNotNull(stream, "stream");
this.accessible = accessible;
this.exists = exists;
@@ -120,21 +164,22 @@ public class GetMediaMetaDataPart {
this.duration = duration;
this.file = file;
this.size = size;
this.packetLength = packetLength;
this.container = container;
this.videoProfile = videoProfile;
this.audioProfile = audioProfile;
this.has64bitOffsets = has64bitOffsets;
this.optimizedForStreaming = optimizedForStreaming;
this.hasThumbnail = hasThumbnail;
this.stream = stream;
}
public GetMediaMetaDataPart(
long id,
String key,
long duration,
String file,
long size,
String container,
String videoProfile,
List<GetMediaMetaDataStream> stream) {
this(Optional.empty(), Optional.empty(), id, key, Optional.empty(), duration, file, size, container, videoProfile, stream);
long size) {
this(Optional.empty(), Optional.empty(), id, key, Optional.empty(), Optional.empty(), file, size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -178,7 +223,7 @@ public class GetMediaMetaDataPart {
* Duration of the part in milliseconds.
*/
@JsonIgnore
public long duration() {
public Optional<Integer> duration() {
return duration;
}
@@ -198,11 +243,16 @@ public class GetMediaMetaDataPart {
return size;
}
@JsonIgnore
public Optional<Integer> packetLength() {
return packetLength;
}
/**
* Container format of the part.
*/
@JsonIgnore
public String container() {
public Optional<String> container() {
return container;
}
@@ -210,16 +260,45 @@ public class GetMediaMetaDataPart {
* Video profile for the part.
*/
@JsonIgnore
public String videoProfile() {
public Optional<String> videoProfile() {
return videoProfile;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
@JsonIgnore
public Optional<String> audioProfile() {
return audioProfile;
}
@JsonIgnore
public Optional<Boolean> has64bitOffsets() {
return has64bitOffsets;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetMediaMetaDataLibraryOptimizedForStreaming> optimizedForStreaming() {
return (Optional<GetMediaMetaDataLibraryOptimizedForStreaming>) optimizedForStreaming;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<GetMediaMetaDataHasThumbnail> hasThumbnail() {
return (Optional<GetMediaMetaDataHasThumbnail>) hasThumbnail;
}
/**
* An array of streams for this part.
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public List<GetMediaMetaDataStream> stream() {
return stream;
public Optional<List<GetMediaMetaDataStream>> stream() {
return (Optional<List<GetMediaMetaDataStream>>) stream;
}
public final static Builder builder() {
@@ -295,7 +374,16 @@ public class GetMediaMetaDataPart {
/**
* Duration of the part in milliseconds.
*/
public GetMediaMetaDataPart withDuration(long duration) {
public GetMediaMetaDataPart withDuration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
/**
* Duration of the part in milliseconds.
*/
public GetMediaMetaDataPart withDuration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
@@ -319,10 +407,31 @@ public class GetMediaMetaDataPart {
return this;
}
public GetMediaMetaDataPart withPacketLength(int packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = Optional.ofNullable(packetLength);
return this;
}
public GetMediaMetaDataPart withPacketLength(Optional<Integer> packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = packetLength;
return this;
}
/**
* Container format of the part.
*/
public GetMediaMetaDataPart withContainer(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
/**
* Container format of the part.
*/
public GetMediaMetaDataPart withContainer(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
@@ -332,15 +441,93 @@ public class GetMediaMetaDataPart {
* Video profile for the part.
*/
public GetMediaMetaDataPart withVideoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
/**
* Video profile for the part.
*/
public GetMediaMetaDataPart withVideoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public GetMediaMetaDataPart withAudioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public GetMediaMetaDataPart withAudioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public GetMediaMetaDataPart withHas64bitOffsets(boolean has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = Optional.ofNullable(has64bitOffsets);
return this;
}
public GetMediaMetaDataPart withHas64bitOffsets(Optional<Boolean> has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = has64bitOffsets;
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public GetMediaMetaDataPart withOptimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreaming optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public GetMediaMetaDataPart withOptimizedForStreaming(Optional<? extends GetMediaMetaDataLibraryOptimizedForStreaming> optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = optimizedForStreaming;
return this;
}
public GetMediaMetaDataPart withHasThumbnail(GetMediaMetaDataHasThumbnail hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
return this;
}
public GetMediaMetaDataPart withHasThumbnail(Optional<? extends GetMediaMetaDataHasThumbnail> hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = hasThumbnail;
return this;
}
/**
* An array of streams for this part.
*/
public GetMediaMetaDataPart withStream(List<GetMediaMetaDataStream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
/**
* An array of streams for this part.
*/
public GetMediaMetaDataPart withStream(Optional<? extends List<GetMediaMetaDataStream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
return this;
@@ -364,8 +551,13 @@ public class GetMediaMetaDataPart {
Objects.deepEquals(this.duration, other.duration) &&
Objects.deepEquals(this.file, other.file) &&
Objects.deepEquals(this.size, other.size) &&
Objects.deepEquals(this.packetLength, other.packetLength) &&
Objects.deepEquals(this.container, other.container) &&
Objects.deepEquals(this.videoProfile, other.videoProfile) &&
Objects.deepEquals(this.audioProfile, other.audioProfile) &&
Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) &&
Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) &&
Objects.deepEquals(this.hasThumbnail, other.hasThumbnail) &&
Objects.deepEquals(this.stream, other.stream);
}
@@ -380,8 +572,13 @@ public class GetMediaMetaDataPart {
duration,
file,
size,
packetLength,
container,
videoProfile,
audioProfile,
has64bitOffsets,
optimizedForStreaming,
hasThumbnail,
stream);
}
@@ -396,8 +593,13 @@ public class GetMediaMetaDataPart {
"duration", duration,
"file", file,
"size", size,
"packetLength", packetLength,
"container", container,
"videoProfile", videoProfile,
"audioProfile", audioProfile,
"has64bitOffsets", has64bitOffsets,
"optimizedForStreaming", optimizedForStreaming,
"hasThumbnail", hasThumbnail,
"stream", stream);
}
@@ -413,17 +615,27 @@ public class GetMediaMetaDataPart {
private Optional<String> indexes = Optional.empty();
private Long duration;
private Optional<Integer> duration = Optional.empty();
private String file;
private Long size;
private String container;
private Optional<Integer> packetLength = Optional.empty();
private String videoProfile;
private Optional<String> container = Optional.empty();
private List<GetMediaMetaDataStream> stream;
private Optional<String> videoProfile = Optional.empty();
private Optional<String> audioProfile = Optional.empty();
private Optional<Boolean> has64bitOffsets = Optional.empty();
private Optional<? extends GetMediaMetaDataLibraryOptimizedForStreaming> optimizedForStreaming = Optional.empty();
private Optional<? extends GetMediaMetaDataHasThumbnail> hasThumbnail;
private Optional<? extends List<GetMediaMetaDataStream>> stream = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -498,7 +710,16 @@ public class GetMediaMetaDataPart {
/**
* Duration of the part in milliseconds.
*/
public Builder duration(long duration) {
public Builder duration(int duration) {
Utils.checkNotNull(duration, "duration");
this.duration = Optional.ofNullable(duration);
return this;
}
/**
* Duration of the part in milliseconds.
*/
public Builder duration(Optional<Integer> duration) {
Utils.checkNotNull(duration, "duration");
this.duration = duration;
return this;
@@ -522,10 +743,31 @@ public class GetMediaMetaDataPart {
return this;
}
public Builder packetLength(int packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = Optional.ofNullable(packetLength);
return this;
}
public Builder packetLength(Optional<Integer> packetLength) {
Utils.checkNotNull(packetLength, "packetLength");
this.packetLength = packetLength;
return this;
}
/**
* Container format of the part.
*/
public Builder container(String container) {
Utils.checkNotNull(container, "container");
this.container = Optional.ofNullable(container);
return this;
}
/**
* Container format of the part.
*/
public Builder container(Optional<String> container) {
Utils.checkNotNull(container, "container");
this.container = container;
return this;
@@ -535,22 +777,102 @@ public class GetMediaMetaDataPart {
* Video profile for the part.
*/
public Builder videoProfile(String videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = Optional.ofNullable(videoProfile);
return this;
}
/**
* Video profile for the part.
*/
public Builder videoProfile(Optional<String> videoProfile) {
Utils.checkNotNull(videoProfile, "videoProfile");
this.videoProfile = videoProfile;
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public Builder audioProfile(String audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = Optional.ofNullable(audioProfile);
return this;
}
/**
* The audio profile used for the media (e.g., DTS, Dolby Digital, etc.).
*/
public Builder audioProfile(Optional<String> audioProfile) {
Utils.checkNotNull(audioProfile, "audioProfile");
this.audioProfile = audioProfile;
return this;
}
public Builder has64bitOffsets(boolean has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = Optional.ofNullable(has64bitOffsets);
return this;
}
public Builder has64bitOffsets(Optional<Boolean> has64bitOffsets) {
Utils.checkNotNull(has64bitOffsets, "has64bitOffsets");
this.has64bitOffsets = has64bitOffsets;
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Builder optimizedForStreaming(GetMediaMetaDataLibraryOptimizedForStreaming optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming);
return this;
}
/**
* Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true
*/
public Builder optimizedForStreaming(Optional<? extends GetMediaMetaDataLibraryOptimizedForStreaming> optimizedForStreaming) {
Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming");
this.optimizedForStreaming = optimizedForStreaming;
return this;
}
public Builder hasThumbnail(GetMediaMetaDataHasThumbnail hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = Optional.ofNullable(hasThumbnail);
return this;
}
public Builder hasThumbnail(Optional<? extends GetMediaMetaDataHasThumbnail> hasThumbnail) {
Utils.checkNotNull(hasThumbnail, "hasThumbnail");
this.hasThumbnail = hasThumbnail;
return this;
}
/**
* An array of streams for this part.
*/
public Builder stream(List<GetMediaMetaDataStream> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = Optional.ofNullable(stream);
return this;
}
/**
* An array of streams for this part.
*/
public Builder stream(Optional<? extends List<GetMediaMetaDataStream>> stream) {
Utils.checkNotNull(stream, "stream");
this.stream = stream;
return this;
}
public GetMediaMetaDataPart build() {
return new GetMediaMetaDataPart(
if (hasThumbnail == null) {
hasThumbnail = _SINGLETON_VALUE_HasThumbnail.value();
} return new GetMediaMetaDataPart(
accessible,
exists,
id,
@@ -559,10 +881,21 @@ public class GetMediaMetaDataPart {
duration,
file,
size,
packetLength,
container,
videoProfile,
audioProfile,
has64bitOffsets,
optimizedForStreaming,
hasThumbnail,
stream);
}
private static final LazySingletonValue<Optional<? extends GetMediaMetaDataHasThumbnail>> _SINGLETON_VALUE_HasThumbnail =
new LazySingletonValue<>(
"hasThumbnail",
"\"0\"",
new TypeReference<Optional<? extends GetMediaMetaDataHasThumbnail>>() {});
}
}

View File

@@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
@@ -32,7 +33,7 @@ public class GetMediaMetaDataStream {
* Stream type (1=video, 2=audio, 3=subtitle).
*/
@JsonProperty("streamType")
private long streamType;
private int streamType;
/**
* Indicates if this stream is default.
@@ -51,13 +52,14 @@ public class GetMediaMetaDataStream {
* Index of the stream.
*/
@JsonProperty("index")
private long index;
private int index;
/**
* Bitrate of the stream.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("bitrate")
private long bitrate;
private Optional<Integer> bitrate;
/**
* Language of the stream.
@@ -77,12 +79,19 @@ public class GetMediaMetaDataStream {
@JsonProperty("languageCode")
private String languageCode;
/**
* Indicates whether header compression is enabled.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("headerCompression")
private Optional<Boolean> headerCompression;
/**
* Dolby Vision BL compatibility ID.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("DOVIBLCompatID")
private Optional<Long> doviblCompatID;
private Optional<Integer> doviblCompatID;
/**
* Indicates if Dolby Vision BL is present.
@@ -103,7 +112,7 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("DOVILevel")
private Optional<Long> doviLevel;
private Optional<Integer> doviLevel;
/**
* Indicates if Dolby Vision is present.
@@ -117,7 +126,7 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("DOVIProfile")
private Optional<Long> doviProfile;
private Optional<Integer> doviProfile;
/**
* Indicates if Dolby Vision RPU is present.
@@ -138,7 +147,7 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("bitDepth")
private Optional<Long> bitDepth;
private Optional<Integer> bitDepth;
/**
* Chroma sample location.
@@ -159,14 +168,14 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("codedHeight")
private Optional<Long> codedHeight;
private Optional<Integer> codedHeight;
/**
* Coded video width.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("codedWidth")
private Optional<Long> codedWidth;
private Optional<Integer> codedWidth;
/**
* Color primaries used.
@@ -208,14 +217,14 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("height")
private Optional<Long> height;
private Optional<Integer> height;
/**
* Video level.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("level")
private Optional<Long> level;
private Optional<Integer> level;
/**
* Indicates if this is the original stream.
@@ -244,14 +253,14 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("refFrames")
private Optional<Long> refFrames;
private Optional<Integer> refFrames;
/**
* Width of the video stream.
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("width")
private Optional<Long> width;
private Optional<Integer> width;
/**
* Display title for the stream.
@@ -281,7 +290,7 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("channels")
private Optional<Long> channels;
private Optional<Integer> channels;
/**
* Audio channel layout.
@@ -295,7 +304,7 @@ public class GetMediaMetaDataStream {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("samplingRate")
private Optional<Long> samplingRate;
private Optional<Integer> samplingRate;
/**
* Indicates if the stream can auto-sync.
@@ -328,47 +337,48 @@ public class GetMediaMetaDataStream {
@JsonCreator
public GetMediaMetaDataStream(
@JsonProperty("id") long id,
@JsonProperty("streamType") long streamType,
@JsonProperty("streamType") int streamType,
@JsonProperty("default") Optional<Boolean> default_,
@JsonProperty("codec") String codec,
@JsonProperty("index") long index,
@JsonProperty("bitrate") long bitrate,
@JsonProperty("index") int index,
@JsonProperty("bitrate") Optional<Integer> bitrate,
@JsonProperty("language") String language,
@JsonProperty("languageTag") String languageTag,
@JsonProperty("languageCode") String languageCode,
@JsonProperty("DOVIBLCompatID") Optional<Long> doviblCompatID,
@JsonProperty("headerCompression") Optional<Boolean> headerCompression,
@JsonProperty("DOVIBLCompatID") Optional<Integer> doviblCompatID,
@JsonProperty("DOVIBLPresent") Optional<Boolean> doviblPresent,
@JsonProperty("DOVIELPresent") Optional<Boolean> dovielPresent,
@JsonProperty("DOVILevel") Optional<Long> doviLevel,
@JsonProperty("DOVILevel") Optional<Integer> doviLevel,
@JsonProperty("DOVIPresent") Optional<Boolean> doviPresent,
@JsonProperty("DOVIProfile") Optional<Long> doviProfile,
@JsonProperty("DOVIProfile") Optional<Integer> doviProfile,
@JsonProperty("DOVIRPUPresent") Optional<Boolean> dovirpuPresent,
@JsonProperty("DOVIVersion") Optional<String> doviVersion,
@JsonProperty("bitDepth") Optional<Long> bitDepth,
@JsonProperty("bitDepth") Optional<Integer> bitDepth,
@JsonProperty("chromaLocation") Optional<String> chromaLocation,
@JsonProperty("chromaSubsampling") Optional<String> chromaSubsampling,
@JsonProperty("codedHeight") Optional<Long> codedHeight,
@JsonProperty("codedWidth") Optional<Long> codedWidth,
@JsonProperty("codedHeight") Optional<Integer> codedHeight,
@JsonProperty("codedWidth") Optional<Integer> codedWidth,
@JsonProperty("colorPrimaries") Optional<String> colorPrimaries,
@JsonProperty("colorRange") Optional<String> colorRange,
@JsonProperty("colorSpace") Optional<String> colorSpace,
@JsonProperty("colorTrc") Optional<String> colorTrc,
@JsonProperty("frameRate") Optional<Float> frameRate,
@JsonProperty("height") Optional<Long> height,
@JsonProperty("level") Optional<Long> level,
@JsonProperty("height") Optional<Integer> height,
@JsonProperty("level") Optional<Integer> level,
@JsonProperty("original") Optional<Boolean> original,
@JsonProperty("hasScalingMatrix") Optional<Boolean> hasScalingMatrix,
@JsonProperty("profile") Optional<String> profile,
@JsonProperty("scanType") Optional<String> scanType,
@JsonProperty("refFrames") Optional<Long> refFrames,
@JsonProperty("width") Optional<Long> width,
@JsonProperty("refFrames") Optional<Integer> refFrames,
@JsonProperty("width") Optional<Integer> width,
@JsonProperty("displayTitle") String displayTitle,
@JsonProperty("extendedDisplayTitle") String extendedDisplayTitle,
@JsonProperty("selected") Optional<Boolean> selected,
@JsonProperty("forced") Optional<Boolean> forced,
@JsonProperty("channels") Optional<Long> channels,
@JsonProperty("channels") Optional<Integer> channels,
@JsonProperty("audioChannelLayout") Optional<String> audioChannelLayout,
@JsonProperty("samplingRate") Optional<Long> samplingRate,
@JsonProperty("samplingRate") Optional<Integer> samplingRate,
@JsonProperty("canAutoSync") Optional<Boolean> canAutoSync,
@JsonProperty("hearingImpaired") Optional<Boolean> hearingImpaired,
@JsonProperty("dub") Optional<Boolean> dub,
@@ -382,6 +392,7 @@ public class GetMediaMetaDataStream {
Utils.checkNotNull(language, "language");
Utils.checkNotNull(languageTag, "languageTag");
Utils.checkNotNull(languageCode, "languageCode");
Utils.checkNotNull(headerCompression, "headerCompression");
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
Utils.checkNotNull(doviblPresent, "doviblPresent");
Utils.checkNotNull(dovielPresent, "dovielPresent");
@@ -428,6 +439,7 @@ public class GetMediaMetaDataStream {
this.language = language;
this.languageTag = languageTag;
this.languageCode = languageCode;
this.headerCompression = headerCompression;
this.doviblCompatID = doviblCompatID;
this.doviblPresent = doviblPresent;
this.dovielPresent = dovielPresent;
@@ -469,16 +481,15 @@ public class GetMediaMetaDataStream {
public GetMediaMetaDataStream(
long id,
long streamType,
int streamType,
String codec,
long index,
long bitrate,
int index,
String language,
String languageTag,
String languageCode,
String displayTitle,
String extendedDisplayTitle) {
this(id, streamType, Optional.empty(), codec, index, bitrate, language, languageTag, languageCode, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
this(id, streamType, Optional.empty(), codec, index, Optional.empty(), language, languageTag, languageCode, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), displayTitle, extendedDisplayTitle, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -493,7 +504,7 @@ public class GetMediaMetaDataStream {
* Stream type (1=video, 2=audio, 3=subtitle).
*/
@JsonIgnore
public long streamType() {
public int streamType() {
return streamType;
}
@@ -517,7 +528,7 @@ public class GetMediaMetaDataStream {
* Index of the stream.
*/
@JsonIgnore
public long index() {
public int index() {
return index;
}
@@ -525,7 +536,7 @@ public class GetMediaMetaDataStream {
* Bitrate of the stream.
*/
@JsonIgnore
public long bitrate() {
public Optional<Integer> bitrate() {
return bitrate;
}
@@ -553,11 +564,19 @@ public class GetMediaMetaDataStream {
return languageCode;
}
/**
* Indicates whether header compression is enabled.
*/
@JsonIgnore
public Optional<Boolean> headerCompression() {
return headerCompression;
}
/**
* Dolby Vision BL compatibility ID.
*/
@JsonIgnore
public Optional<Long> doviblCompatID() {
public Optional<Integer> doviblCompatID() {
return doviblCompatID;
}
@@ -581,7 +600,7 @@ public class GetMediaMetaDataStream {
* Dolby Vision level.
*/
@JsonIgnore
public Optional<Long> doviLevel() {
public Optional<Integer> doviLevel() {
return doviLevel;
}
@@ -597,7 +616,7 @@ public class GetMediaMetaDataStream {
* Dolby Vision profile.
*/
@JsonIgnore
public Optional<Long> doviProfile() {
public Optional<Integer> doviProfile() {
return doviProfile;
}
@@ -621,7 +640,7 @@ public class GetMediaMetaDataStream {
* Bit depth of the video stream.
*/
@JsonIgnore
public Optional<Long> bitDepth() {
public Optional<Integer> bitDepth() {
return bitDepth;
}
@@ -645,7 +664,7 @@ public class GetMediaMetaDataStream {
* Coded video height.
*/
@JsonIgnore
public Optional<Long> codedHeight() {
public Optional<Integer> codedHeight() {
return codedHeight;
}
@@ -653,7 +672,7 @@ public class GetMediaMetaDataStream {
* Coded video width.
*/
@JsonIgnore
public Optional<Long> codedWidth() {
public Optional<Integer> codedWidth() {
return codedWidth;
}
@@ -701,7 +720,7 @@ public class GetMediaMetaDataStream {
* Height of the video stream.
*/
@JsonIgnore
public Optional<Long> height() {
public Optional<Integer> height() {
return height;
}
@@ -709,7 +728,7 @@ public class GetMediaMetaDataStream {
* Video level.
*/
@JsonIgnore
public Optional<Long> level() {
public Optional<Integer> level() {
return level;
}
@@ -743,7 +762,7 @@ public class GetMediaMetaDataStream {
* Number of reference frames.
*/
@JsonIgnore
public Optional<Long> refFrames() {
public Optional<Integer> refFrames() {
return refFrames;
}
@@ -751,7 +770,7 @@ public class GetMediaMetaDataStream {
* Width of the video stream.
*/
@JsonIgnore
public Optional<Long> width() {
public Optional<Integer> width() {
return width;
}
@@ -788,7 +807,7 @@ public class GetMediaMetaDataStream {
* Number of audio channels (for audio streams).
*/
@JsonIgnore
public Optional<Long> channels() {
public Optional<Integer> channels() {
return channels;
}
@@ -804,7 +823,7 @@ public class GetMediaMetaDataStream {
* Sampling rate for the audio stream.
*/
@JsonIgnore
public Optional<Long> samplingRate() {
public Optional<Integer> samplingRate() {
return samplingRate;
}
@@ -856,7 +875,7 @@ public class GetMediaMetaDataStream {
/**
* Stream type (1=video, 2=audio, 3=subtitle).
*/
public GetMediaMetaDataStream withStreamType(long streamType) {
public GetMediaMetaDataStream withStreamType(int streamType) {
Utils.checkNotNull(streamType, "streamType");
this.streamType = streamType;
return this;
@@ -892,7 +911,7 @@ public class GetMediaMetaDataStream {
/**
* Index of the stream.
*/
public GetMediaMetaDataStream withIndex(long index) {
public GetMediaMetaDataStream withIndex(int index) {
Utils.checkNotNull(index, "index");
this.index = index;
return this;
@@ -901,7 +920,16 @@ public class GetMediaMetaDataStream {
/**
* Bitrate of the stream.
*/
public GetMediaMetaDataStream withBitrate(long bitrate) {
public GetMediaMetaDataStream withBitrate(int bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = Optional.ofNullable(bitrate);
return this;
}
/**
* Bitrate of the stream.
*/
public GetMediaMetaDataStream withBitrate(Optional<Integer> bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = bitrate;
return this;
@@ -934,10 +962,28 @@ public class GetMediaMetaDataStream {
return this;
}
/**
* Indicates whether header compression is enabled.
*/
public GetMediaMetaDataStream withHeaderCompression(boolean headerCompression) {
Utils.checkNotNull(headerCompression, "headerCompression");
this.headerCompression = Optional.ofNullable(headerCompression);
return this;
}
/**
* Indicates whether header compression is enabled.
*/
public GetMediaMetaDataStream withHeaderCompression(Optional<Boolean> headerCompression) {
Utils.checkNotNull(headerCompression, "headerCompression");
this.headerCompression = headerCompression;
return this;
}
/**
* Dolby Vision BL compatibility ID.
*/
public GetMediaMetaDataStream withDOVIBLCompatID(long doviblCompatID) {
public GetMediaMetaDataStream withDOVIBLCompatID(int doviblCompatID) {
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
this.doviblCompatID = Optional.ofNullable(doviblCompatID);
return this;
@@ -946,7 +992,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision BL compatibility ID.
*/
public GetMediaMetaDataStream withDOVIBLCompatID(Optional<Long> doviblCompatID) {
public GetMediaMetaDataStream withDOVIBLCompatID(Optional<Integer> doviblCompatID) {
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
this.doviblCompatID = doviblCompatID;
return this;
@@ -991,7 +1037,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision level.
*/
public GetMediaMetaDataStream withDOVILevel(long doviLevel) {
public GetMediaMetaDataStream withDOVILevel(int doviLevel) {
Utils.checkNotNull(doviLevel, "doviLevel");
this.doviLevel = Optional.ofNullable(doviLevel);
return this;
@@ -1000,7 +1046,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision level.
*/
public GetMediaMetaDataStream withDOVILevel(Optional<Long> doviLevel) {
public GetMediaMetaDataStream withDOVILevel(Optional<Integer> doviLevel) {
Utils.checkNotNull(doviLevel, "doviLevel");
this.doviLevel = doviLevel;
return this;
@@ -1027,7 +1073,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision profile.
*/
public GetMediaMetaDataStream withDOVIProfile(long doviProfile) {
public GetMediaMetaDataStream withDOVIProfile(int doviProfile) {
Utils.checkNotNull(doviProfile, "doviProfile");
this.doviProfile = Optional.ofNullable(doviProfile);
return this;
@@ -1036,7 +1082,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision profile.
*/
public GetMediaMetaDataStream withDOVIProfile(Optional<Long> doviProfile) {
public GetMediaMetaDataStream withDOVIProfile(Optional<Integer> doviProfile) {
Utils.checkNotNull(doviProfile, "doviProfile");
this.doviProfile = doviProfile;
return this;
@@ -1081,7 +1127,7 @@ public class GetMediaMetaDataStream {
/**
* Bit depth of the video stream.
*/
public GetMediaMetaDataStream withBitDepth(long bitDepth) {
public GetMediaMetaDataStream withBitDepth(int bitDepth) {
Utils.checkNotNull(bitDepth, "bitDepth");
this.bitDepth = Optional.ofNullable(bitDepth);
return this;
@@ -1090,7 +1136,7 @@ public class GetMediaMetaDataStream {
/**
* Bit depth of the video stream.
*/
public GetMediaMetaDataStream withBitDepth(Optional<Long> bitDepth) {
public GetMediaMetaDataStream withBitDepth(Optional<Integer> bitDepth) {
Utils.checkNotNull(bitDepth, "bitDepth");
this.bitDepth = bitDepth;
return this;
@@ -1135,7 +1181,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video height.
*/
public GetMediaMetaDataStream withCodedHeight(long codedHeight) {
public GetMediaMetaDataStream withCodedHeight(int codedHeight) {
Utils.checkNotNull(codedHeight, "codedHeight");
this.codedHeight = Optional.ofNullable(codedHeight);
return this;
@@ -1144,7 +1190,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video height.
*/
public GetMediaMetaDataStream withCodedHeight(Optional<Long> codedHeight) {
public GetMediaMetaDataStream withCodedHeight(Optional<Integer> codedHeight) {
Utils.checkNotNull(codedHeight, "codedHeight");
this.codedHeight = codedHeight;
return this;
@@ -1153,7 +1199,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video width.
*/
public GetMediaMetaDataStream withCodedWidth(long codedWidth) {
public GetMediaMetaDataStream withCodedWidth(int codedWidth) {
Utils.checkNotNull(codedWidth, "codedWidth");
this.codedWidth = Optional.ofNullable(codedWidth);
return this;
@@ -1162,7 +1208,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video width.
*/
public GetMediaMetaDataStream withCodedWidth(Optional<Long> codedWidth) {
public GetMediaMetaDataStream withCodedWidth(Optional<Integer> codedWidth) {
Utils.checkNotNull(codedWidth, "codedWidth");
this.codedWidth = codedWidth;
return this;
@@ -1261,7 +1307,7 @@ public class GetMediaMetaDataStream {
/**
* Height of the video stream.
*/
public GetMediaMetaDataStream withHeight(long height) {
public GetMediaMetaDataStream withHeight(int height) {
Utils.checkNotNull(height, "height");
this.height = Optional.ofNullable(height);
return this;
@@ -1270,7 +1316,7 @@ public class GetMediaMetaDataStream {
/**
* Height of the video stream.
*/
public GetMediaMetaDataStream withHeight(Optional<Long> height) {
public GetMediaMetaDataStream withHeight(Optional<Integer> height) {
Utils.checkNotNull(height, "height");
this.height = height;
return this;
@@ -1279,7 +1325,7 @@ public class GetMediaMetaDataStream {
/**
* Video level.
*/
public GetMediaMetaDataStream withLevel(long level) {
public GetMediaMetaDataStream withLevel(int level) {
Utils.checkNotNull(level, "level");
this.level = Optional.ofNullable(level);
return this;
@@ -1288,7 +1334,7 @@ public class GetMediaMetaDataStream {
/**
* Video level.
*/
public GetMediaMetaDataStream withLevel(Optional<Long> level) {
public GetMediaMetaDataStream withLevel(Optional<Integer> level) {
Utils.checkNotNull(level, "level");
this.level = level;
return this;
@@ -1357,7 +1403,7 @@ public class GetMediaMetaDataStream {
/**
* Number of reference frames.
*/
public GetMediaMetaDataStream withRefFrames(long refFrames) {
public GetMediaMetaDataStream withRefFrames(int refFrames) {
Utils.checkNotNull(refFrames, "refFrames");
this.refFrames = Optional.ofNullable(refFrames);
return this;
@@ -1366,7 +1412,7 @@ public class GetMediaMetaDataStream {
/**
* Number of reference frames.
*/
public GetMediaMetaDataStream withRefFrames(Optional<Long> refFrames) {
public GetMediaMetaDataStream withRefFrames(Optional<Integer> refFrames) {
Utils.checkNotNull(refFrames, "refFrames");
this.refFrames = refFrames;
return this;
@@ -1375,7 +1421,7 @@ public class GetMediaMetaDataStream {
/**
* Width of the video stream.
*/
public GetMediaMetaDataStream withWidth(long width) {
public GetMediaMetaDataStream withWidth(int width) {
Utils.checkNotNull(width, "width");
this.width = Optional.ofNullable(width);
return this;
@@ -1384,7 +1430,7 @@ public class GetMediaMetaDataStream {
/**
* Width of the video stream.
*/
public GetMediaMetaDataStream withWidth(Optional<Long> width) {
public GetMediaMetaDataStream withWidth(Optional<Integer> width) {
Utils.checkNotNull(width, "width");
this.width = width;
return this;
@@ -1441,7 +1487,7 @@ public class GetMediaMetaDataStream {
/**
* Number of audio channels (for audio streams).
*/
public GetMediaMetaDataStream withChannels(long channels) {
public GetMediaMetaDataStream withChannels(int channels) {
Utils.checkNotNull(channels, "channels");
this.channels = Optional.ofNullable(channels);
return this;
@@ -1450,7 +1496,7 @@ public class GetMediaMetaDataStream {
/**
* Number of audio channels (for audio streams).
*/
public GetMediaMetaDataStream withChannels(Optional<Long> channels) {
public GetMediaMetaDataStream withChannels(Optional<Integer> channels) {
Utils.checkNotNull(channels, "channels");
this.channels = channels;
return this;
@@ -1477,7 +1523,7 @@ public class GetMediaMetaDataStream {
/**
* Sampling rate for the audio stream.
*/
public GetMediaMetaDataStream withSamplingRate(long samplingRate) {
public GetMediaMetaDataStream withSamplingRate(int samplingRate) {
Utils.checkNotNull(samplingRate, "samplingRate");
this.samplingRate = Optional.ofNullable(samplingRate);
return this;
@@ -1486,7 +1532,7 @@ public class GetMediaMetaDataStream {
/**
* Sampling rate for the audio stream.
*/
public GetMediaMetaDataStream withSamplingRate(Optional<Long> samplingRate) {
public GetMediaMetaDataStream withSamplingRate(Optional<Integer> samplingRate) {
Utils.checkNotNull(samplingRate, "samplingRate");
this.samplingRate = samplingRate;
return this;
@@ -1583,6 +1629,7 @@ public class GetMediaMetaDataStream {
Objects.deepEquals(this.language, other.language) &&
Objects.deepEquals(this.languageTag, other.languageTag) &&
Objects.deepEquals(this.languageCode, other.languageCode) &&
Objects.deepEquals(this.headerCompression, other.headerCompression) &&
Objects.deepEquals(this.doviblCompatID, other.doviblCompatID) &&
Objects.deepEquals(this.doviblPresent, other.doviblPresent) &&
Objects.deepEquals(this.dovielPresent, other.dovielPresent) &&
@@ -1634,6 +1681,7 @@ public class GetMediaMetaDataStream {
language,
languageTag,
languageCode,
headerCompression,
doviblCompatID,
doviblPresent,
dovielPresent,
@@ -1685,6 +1733,7 @@ public class GetMediaMetaDataStream {
"language", language,
"languageTag", languageTag,
"languageCode", languageCode,
"headerCompression", headerCompression,
"doviblCompatID", doviblCompatID,
"doviblPresent", doviblPresent,
"dovielPresent", dovielPresent,
@@ -1728,15 +1777,15 @@ public class GetMediaMetaDataStream {
private Long id;
private Long streamType;
private Integer streamType;
private Optional<Boolean> default_ = Optional.empty();
private String codec;
private Long index;
private Integer index;
private Long bitrate;
private Optional<Integer> bitrate = Optional.empty();
private String language;
@@ -1744,31 +1793,33 @@ public class GetMediaMetaDataStream {
private String languageCode;
private Optional<Long> doviblCompatID = Optional.empty();
private Optional<Boolean> headerCompression = Optional.empty();
private Optional<Integer> doviblCompatID = Optional.empty();
private Optional<Boolean> doviblPresent = Optional.empty();
private Optional<Boolean> dovielPresent = Optional.empty();
private Optional<Long> doviLevel = Optional.empty();
private Optional<Integer> doviLevel = Optional.empty();
private Optional<Boolean> doviPresent = Optional.empty();
private Optional<Long> doviProfile = Optional.empty();
private Optional<Integer> doviProfile = Optional.empty();
private Optional<Boolean> dovirpuPresent = Optional.empty();
private Optional<String> doviVersion = Optional.empty();
private Optional<Long> bitDepth = Optional.empty();
private Optional<Integer> bitDepth = Optional.empty();
private Optional<String> chromaLocation = Optional.empty();
private Optional<String> chromaSubsampling = Optional.empty();
private Optional<Long> codedHeight = Optional.empty();
private Optional<Integer> codedHeight = Optional.empty();
private Optional<Long> codedWidth = Optional.empty();
private Optional<Integer> codedWidth = Optional.empty();
private Optional<String> colorPrimaries = Optional.empty();
@@ -1780,9 +1831,9 @@ public class GetMediaMetaDataStream {
private Optional<Float> frameRate = Optional.empty();
private Optional<Long> height = Optional.empty();
private Optional<Integer> height = Optional.empty();
private Optional<Long> level = Optional.empty();
private Optional<Integer> level = Optional.empty();
private Optional<Boolean> original = Optional.empty();
@@ -1792,9 +1843,9 @@ public class GetMediaMetaDataStream {
private Optional<String> scanType = Optional.empty();
private Optional<Long> refFrames = Optional.empty();
private Optional<Integer> refFrames = Optional.empty();
private Optional<Long> width = Optional.empty();
private Optional<Integer> width = Optional.empty();
private String displayTitle;
@@ -1804,11 +1855,11 @@ public class GetMediaMetaDataStream {
private Optional<Boolean> forced = Optional.empty();
private Optional<Long> channels = Optional.empty();
private Optional<Integer> channels = Optional.empty();
private Optional<String> audioChannelLayout = Optional.empty();
private Optional<Long> samplingRate = Optional.empty();
private Optional<Integer> samplingRate = Optional.empty();
private Optional<Boolean> canAutoSync = Optional.empty();
@@ -1834,7 +1885,7 @@ public class GetMediaMetaDataStream {
/**
* Stream type (1=video, 2=audio, 3=subtitle).
*/
public Builder streamType(long streamType) {
public Builder streamType(int streamType) {
Utils.checkNotNull(streamType, "streamType");
this.streamType = streamType;
return this;
@@ -1870,7 +1921,7 @@ public class GetMediaMetaDataStream {
/**
* Index of the stream.
*/
public Builder index(long index) {
public Builder index(int index) {
Utils.checkNotNull(index, "index");
this.index = index;
return this;
@@ -1879,7 +1930,16 @@ public class GetMediaMetaDataStream {
/**
* Bitrate of the stream.
*/
public Builder bitrate(long bitrate) {
public Builder bitrate(int bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = Optional.ofNullable(bitrate);
return this;
}
/**
* Bitrate of the stream.
*/
public Builder bitrate(Optional<Integer> bitrate) {
Utils.checkNotNull(bitrate, "bitrate");
this.bitrate = bitrate;
return this;
@@ -1912,10 +1972,28 @@ public class GetMediaMetaDataStream {
return this;
}
/**
* Indicates whether header compression is enabled.
*/
public Builder headerCompression(boolean headerCompression) {
Utils.checkNotNull(headerCompression, "headerCompression");
this.headerCompression = Optional.ofNullable(headerCompression);
return this;
}
/**
* Indicates whether header compression is enabled.
*/
public Builder headerCompression(Optional<Boolean> headerCompression) {
Utils.checkNotNull(headerCompression, "headerCompression");
this.headerCompression = headerCompression;
return this;
}
/**
* Dolby Vision BL compatibility ID.
*/
public Builder doviblCompatID(long doviblCompatID) {
public Builder doviblCompatID(int doviblCompatID) {
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
this.doviblCompatID = Optional.ofNullable(doviblCompatID);
return this;
@@ -1924,7 +2002,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision BL compatibility ID.
*/
public Builder doviblCompatID(Optional<Long> doviblCompatID) {
public Builder doviblCompatID(Optional<Integer> doviblCompatID) {
Utils.checkNotNull(doviblCompatID, "doviblCompatID");
this.doviblCompatID = doviblCompatID;
return this;
@@ -1969,7 +2047,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision level.
*/
public Builder doviLevel(long doviLevel) {
public Builder doviLevel(int doviLevel) {
Utils.checkNotNull(doviLevel, "doviLevel");
this.doviLevel = Optional.ofNullable(doviLevel);
return this;
@@ -1978,7 +2056,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision level.
*/
public Builder doviLevel(Optional<Long> doviLevel) {
public Builder doviLevel(Optional<Integer> doviLevel) {
Utils.checkNotNull(doviLevel, "doviLevel");
this.doviLevel = doviLevel;
return this;
@@ -2005,7 +2083,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision profile.
*/
public Builder doviProfile(long doviProfile) {
public Builder doviProfile(int doviProfile) {
Utils.checkNotNull(doviProfile, "doviProfile");
this.doviProfile = Optional.ofNullable(doviProfile);
return this;
@@ -2014,7 +2092,7 @@ public class GetMediaMetaDataStream {
/**
* Dolby Vision profile.
*/
public Builder doviProfile(Optional<Long> doviProfile) {
public Builder doviProfile(Optional<Integer> doviProfile) {
Utils.checkNotNull(doviProfile, "doviProfile");
this.doviProfile = doviProfile;
return this;
@@ -2059,7 +2137,7 @@ public class GetMediaMetaDataStream {
/**
* Bit depth of the video stream.
*/
public Builder bitDepth(long bitDepth) {
public Builder bitDepth(int bitDepth) {
Utils.checkNotNull(bitDepth, "bitDepth");
this.bitDepth = Optional.ofNullable(bitDepth);
return this;
@@ -2068,7 +2146,7 @@ public class GetMediaMetaDataStream {
/**
* Bit depth of the video stream.
*/
public Builder bitDepth(Optional<Long> bitDepth) {
public Builder bitDepth(Optional<Integer> bitDepth) {
Utils.checkNotNull(bitDepth, "bitDepth");
this.bitDepth = bitDepth;
return this;
@@ -2113,7 +2191,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video height.
*/
public Builder codedHeight(long codedHeight) {
public Builder codedHeight(int codedHeight) {
Utils.checkNotNull(codedHeight, "codedHeight");
this.codedHeight = Optional.ofNullable(codedHeight);
return this;
@@ -2122,7 +2200,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video height.
*/
public Builder codedHeight(Optional<Long> codedHeight) {
public Builder codedHeight(Optional<Integer> codedHeight) {
Utils.checkNotNull(codedHeight, "codedHeight");
this.codedHeight = codedHeight;
return this;
@@ -2131,7 +2209,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video width.
*/
public Builder codedWidth(long codedWidth) {
public Builder codedWidth(int codedWidth) {
Utils.checkNotNull(codedWidth, "codedWidth");
this.codedWidth = Optional.ofNullable(codedWidth);
return this;
@@ -2140,7 +2218,7 @@ public class GetMediaMetaDataStream {
/**
* Coded video width.
*/
public Builder codedWidth(Optional<Long> codedWidth) {
public Builder codedWidth(Optional<Integer> codedWidth) {
Utils.checkNotNull(codedWidth, "codedWidth");
this.codedWidth = codedWidth;
return this;
@@ -2239,7 +2317,7 @@ public class GetMediaMetaDataStream {
/**
* Height of the video stream.
*/
public Builder height(long height) {
public Builder height(int height) {
Utils.checkNotNull(height, "height");
this.height = Optional.ofNullable(height);
return this;
@@ -2248,7 +2326,7 @@ public class GetMediaMetaDataStream {
/**
* Height of the video stream.
*/
public Builder height(Optional<Long> height) {
public Builder height(Optional<Integer> height) {
Utils.checkNotNull(height, "height");
this.height = height;
return this;
@@ -2257,7 +2335,7 @@ public class GetMediaMetaDataStream {
/**
* Video level.
*/
public Builder level(long level) {
public Builder level(int level) {
Utils.checkNotNull(level, "level");
this.level = Optional.ofNullable(level);
return this;
@@ -2266,7 +2344,7 @@ public class GetMediaMetaDataStream {
/**
* Video level.
*/
public Builder level(Optional<Long> level) {
public Builder level(Optional<Integer> level) {
Utils.checkNotNull(level, "level");
this.level = level;
return this;
@@ -2335,7 +2413,7 @@ public class GetMediaMetaDataStream {
/**
* Number of reference frames.
*/
public Builder refFrames(long refFrames) {
public Builder refFrames(int refFrames) {
Utils.checkNotNull(refFrames, "refFrames");
this.refFrames = Optional.ofNullable(refFrames);
return this;
@@ -2344,7 +2422,7 @@ public class GetMediaMetaDataStream {
/**
* Number of reference frames.
*/
public Builder refFrames(Optional<Long> refFrames) {
public Builder refFrames(Optional<Integer> refFrames) {
Utils.checkNotNull(refFrames, "refFrames");
this.refFrames = refFrames;
return this;
@@ -2353,7 +2431,7 @@ public class GetMediaMetaDataStream {
/**
* Width of the video stream.
*/
public Builder width(long width) {
public Builder width(int width) {
Utils.checkNotNull(width, "width");
this.width = Optional.ofNullable(width);
return this;
@@ -2362,7 +2440,7 @@ public class GetMediaMetaDataStream {
/**
* Width of the video stream.
*/
public Builder width(Optional<Long> width) {
public Builder width(Optional<Integer> width) {
Utils.checkNotNull(width, "width");
this.width = width;
return this;
@@ -2419,7 +2497,7 @@ public class GetMediaMetaDataStream {
/**
* Number of audio channels (for audio streams).
*/
public Builder channels(long channels) {
public Builder channels(int channels) {
Utils.checkNotNull(channels, "channels");
this.channels = Optional.ofNullable(channels);
return this;
@@ -2428,7 +2506,7 @@ public class GetMediaMetaDataStream {
/**
* Number of audio channels (for audio streams).
*/
public Builder channels(Optional<Long> channels) {
public Builder channels(Optional<Integer> channels) {
Utils.checkNotNull(channels, "channels");
this.channels = channels;
return this;
@@ -2455,7 +2533,7 @@ public class GetMediaMetaDataStream {
/**
* Sampling rate for the audio stream.
*/
public Builder samplingRate(long samplingRate) {
public Builder samplingRate(int samplingRate) {
Utils.checkNotNull(samplingRate, "samplingRate");
this.samplingRate = Optional.ofNullable(samplingRate);
return this;
@@ -2464,7 +2542,7 @@ public class GetMediaMetaDataStream {
/**
* Sampling rate for the audio stream.
*/
public Builder samplingRate(Optional<Long> samplingRate) {
public Builder samplingRate(Optional<Integer> samplingRate) {
Utils.checkNotNull(samplingRate, "samplingRate");
this.samplingRate = samplingRate;
return this;
@@ -2553,6 +2631,7 @@ public class GetMediaMetaDataStream {
language,
languageTag,
languageCode,
headerCompression,
doviblCompatID,
doviblPresent,
dovielPresent,

View File

@@ -7,11 +7,15 @@ package dev.plexapi.sdk.models.operations;
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.Boolean;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetRecentlyAddedFilter {
@@ -31,23 +35,39 @@ public class GetRecentlyAddedFilter {
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("advanced")
private Optional<Boolean> advanced;
@JsonCreator
public GetRecentlyAddedFilter(
@JsonProperty("filter") String filter,
@JsonProperty("filterType") String filterType,
@JsonProperty("key") String key,
@JsonProperty("title") String title,
@JsonProperty("type") String type) {
@JsonProperty("type") String type,
@JsonProperty("advanced") Optional<Boolean> advanced) {
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(filterType, "filterType");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(advanced, "advanced");
this.filter = filter;
this.filterType = filterType;
this.key = key;
this.title = title;
this.type = type;
this.advanced = advanced;
}
public GetRecentlyAddedFilter(
String filter,
String filterType,
String key,
String title,
String type) {
this(filter, filterType, key, title, type, Optional.empty());
}
@JsonIgnore
@@ -75,6 +95,11 @@ public class GetRecentlyAddedFilter {
return type;
}
@JsonIgnore
public Optional<Boolean> advanced() {
return advanced;
}
public final static Builder builder() {
return new Builder();
}
@@ -108,6 +133,18 @@ public class GetRecentlyAddedFilter {
this.type = type;
return this;
}
public GetRecentlyAddedFilter withAdvanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public GetRecentlyAddedFilter withAdvanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -123,7 +160,8 @@ public class GetRecentlyAddedFilter {
Objects.deepEquals(this.filterType, other.filterType) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.type, other.type);
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.advanced, other.advanced);
}
@Override
@@ -133,7 +171,8 @@ public class GetRecentlyAddedFilter {
filterType,
key,
title,
type);
type,
advanced);
}
@Override
@@ -143,7 +182,8 @@ public class GetRecentlyAddedFilter {
"filterType", filterType,
"key", key,
"title", title,
"type", type);
"type", type,
"advanced", advanced);
}
public final static class Builder {
@@ -156,7 +196,9 @@ public class GetRecentlyAddedFilter {
private String title;
private String type;
private String type;
private Optional<Boolean> advanced = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -191,6 +233,18 @@ public class GetRecentlyAddedFilter {
this.type = type;
return this;
}
public Builder advanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public Builder advanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
public GetRecentlyAddedFilter build() {
return new GetRecentlyAddedFilter(
@@ -198,7 +252,8 @@ public class GetRecentlyAddedFilter {
filterType,
key,
title,
type);
type,
advanced);
}
}
}

View File

@@ -17,7 +17,9 @@ public enum GetRecentlyAddedHubsType {
Movie("movie"),
TvShow("show"),
Season("season"),
Episode("episode");
Episode("episode"),
Artist("artist"),
Album("album");
@JsonValue
private final String value;

View File

@@ -7,11 +7,15 @@ package dev.plexapi.sdk.models.operations;
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.Boolean;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetRecentlyAddedLibraryFilter {
@@ -31,23 +35,39 @@ public class GetRecentlyAddedLibraryFilter {
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("advanced")
private Optional<Boolean> advanced;
@JsonCreator
public GetRecentlyAddedLibraryFilter(
@JsonProperty("filter") String filter,
@JsonProperty("filterType") String filterType,
@JsonProperty("key") String key,
@JsonProperty("title") String title,
@JsonProperty("type") String type) {
@JsonProperty("type") String type,
@JsonProperty("advanced") Optional<Boolean> advanced) {
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(filterType, "filterType");
Utils.checkNotNull(key, "key");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(advanced, "advanced");
this.filter = filter;
this.filterType = filterType;
this.key = key;
this.title = title;
this.type = type;
this.advanced = advanced;
}
public GetRecentlyAddedLibraryFilter(
String filter,
String filterType,
String key,
String title,
String type) {
this(filter, filterType, key, title, type, Optional.empty());
}
@JsonIgnore
@@ -75,6 +95,11 @@ public class GetRecentlyAddedLibraryFilter {
return type;
}
@JsonIgnore
public Optional<Boolean> advanced() {
return advanced;
}
public final static Builder builder() {
return new Builder();
}
@@ -108,6 +133,18 @@ public class GetRecentlyAddedLibraryFilter {
this.type = type;
return this;
}
public GetRecentlyAddedLibraryFilter withAdvanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public GetRecentlyAddedLibraryFilter withAdvanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -123,7 +160,8 @@ public class GetRecentlyAddedLibraryFilter {
Objects.deepEquals(this.filterType, other.filterType) &&
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.type, other.type);
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.advanced, other.advanced);
}
@Override
@@ -133,7 +171,8 @@ public class GetRecentlyAddedLibraryFilter {
filterType,
key,
title,
type);
type,
advanced);
}
@Override
@@ -143,7 +182,8 @@ public class GetRecentlyAddedLibraryFilter {
"filterType", filterType,
"key", key,
"title", title,
"type", type);
"type", type,
"advanced", advanced);
}
public final static class Builder {
@@ -156,7 +196,9 @@ public class GetRecentlyAddedLibraryFilter {
private String title;
private String type;
private String type;
private Optional<Boolean> advanced = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -191,6 +233,18 @@ public class GetRecentlyAddedLibraryFilter {
this.type = type;
return this;
}
public Builder advanced(boolean advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = Optional.ofNullable(advanced);
return this;
}
public Builder advanced(Optional<Boolean> advanced) {
Utils.checkNotNull(advanced, "advanced");
this.advanced = advanced;
return this;
}
public GetRecentlyAddedLibraryFilter build() {
return new GetRecentlyAddedLibraryFilter(
@@ -198,7 +252,8 @@ public class GetRecentlyAddedLibraryFilter {
filterType,
key,
title,
type);
type,
advanced);
}
}
}

View File

@@ -28,6 +28,10 @@ public class GetRecentlyAddedLibraryType {
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("subtype")
private Optional<String> subtype;
@JsonProperty("title")
private String title;
@@ -50,6 +54,7 @@ public class GetRecentlyAddedLibraryType {
public GetRecentlyAddedLibraryType(
@JsonProperty("key") String key,
@JsonProperty("type") String type,
@JsonProperty("subtype") Optional<String> subtype,
@JsonProperty("title") String title,
@JsonProperty("active") boolean active,
@JsonProperty("Filter") Optional<? extends List<GetRecentlyAddedLibraryFilter>> filter,
@@ -57,6 +62,7 @@ public class GetRecentlyAddedLibraryType {
@JsonProperty("Field") Optional<? extends List<Field>> field) {
Utils.checkNotNull(key, "key");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(subtype, "subtype");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(active, "active");
Utils.checkNotNull(filter, "filter");
@@ -64,6 +70,7 @@ public class GetRecentlyAddedLibraryType {
Utils.checkNotNull(field, "field");
this.key = key;
this.type = type;
this.subtype = subtype;
this.title = title;
this.active = active;
this.filter = filter;
@@ -76,7 +83,7 @@ public class GetRecentlyAddedLibraryType {
String type,
String title,
boolean active) {
this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty());
this(key, type, Optional.empty(), title, active, Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
@@ -89,6 +96,11 @@ public class GetRecentlyAddedLibraryType {
return type;
}
@JsonIgnore
public Optional<String> subtype() {
return subtype;
}
@JsonIgnore
public String title() {
return title;
@@ -133,6 +145,18 @@ public class GetRecentlyAddedLibraryType {
return this;
}
public GetRecentlyAddedLibraryType withSubtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public GetRecentlyAddedLibraryType withSubtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public GetRecentlyAddedLibraryType withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
@@ -193,6 +217,7 @@ public class GetRecentlyAddedLibraryType {
return
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.subtype, other.subtype) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.active, other.active) &&
Objects.deepEquals(this.filter, other.filter) &&
@@ -205,6 +230,7 @@ public class GetRecentlyAddedLibraryType {
return Objects.hash(
key,
type,
subtype,
title,
active,
filter,
@@ -217,6 +243,7 @@ public class GetRecentlyAddedLibraryType {
return Utils.toString(GetRecentlyAddedLibraryType.class,
"key", key,
"type", type,
"subtype", subtype,
"title", title,
"active", active,
"filter", filter,
@@ -230,6 +257,8 @@ public class GetRecentlyAddedLibraryType {
private String type;
private Optional<String> subtype = Optional.empty();
private String title;
private Boolean active;
@@ -256,6 +285,18 @@ public class GetRecentlyAddedLibraryType {
return this;
}
public Builder subtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public Builder subtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
@@ -308,6 +349,7 @@ public class GetRecentlyAddedLibraryType {
return new GetRecentlyAddedLibraryType(
key,
type,
subtype,
title,
active,
filter,

View File

@@ -12,8 +12,8 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
@@ -25,7 +25,7 @@ import java.util.Optional;
public class GetRecentlyAddedMediaContainer {
@JsonProperty("size")
private double size;
private long size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("offset")
@@ -57,7 +57,7 @@ public class GetRecentlyAddedMediaContainer {
@JsonCreator
public GetRecentlyAddedMediaContainer(
@JsonProperty("size") double size,
@JsonProperty("size") long size,
@JsonProperty("offset") Optional<Integer> offset,
@JsonProperty("totalSize") Optional<Integer> totalSize,
@JsonProperty("identifier") Optional<String> identifier,
@@ -81,12 +81,12 @@ public class GetRecentlyAddedMediaContainer {
}
public GetRecentlyAddedMediaContainer(
double size) {
long size) {
this(size, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public double size() {
public long size() {
return size;
}
@@ -130,7 +130,7 @@ public class GetRecentlyAddedMediaContainer {
return new Builder();
}
public GetRecentlyAddedMediaContainer withSize(double size) {
public GetRecentlyAddedMediaContainer withSize(long size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;
@@ -261,7 +261,7 @@ public class GetRecentlyAddedMediaContainer {
public final static class Builder {
private Double size;
private Long size;
private Optional<Integer> offset = Optional.empty();
@@ -279,7 +279,7 @@ public class GetRecentlyAddedMediaContainer {
// force use of static builder() method
}
public Builder size(double size) {
public Builder size(long size) {
Utils.checkNotNull(size, "size");
this.size = size;
return this;

View File

@@ -28,6 +28,10 @@ public class GetRecentlyAddedType {
@JsonProperty("type")
private String type;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("subtype")
private Optional<String> subtype;
@JsonProperty("title")
private String title;
@@ -50,6 +54,7 @@ public class GetRecentlyAddedType {
public GetRecentlyAddedType(
@JsonProperty("key") String key,
@JsonProperty("type") String type,
@JsonProperty("subtype") Optional<String> subtype,
@JsonProperty("title") String title,
@JsonProperty("active") boolean active,
@JsonProperty("Filter") Optional<? extends List<GetRecentlyAddedFilter>> filter,
@@ -57,6 +62,7 @@ public class GetRecentlyAddedType {
@JsonProperty("Field") Optional<? extends List<GetRecentlyAddedField>> field) {
Utils.checkNotNull(key, "key");
Utils.checkNotNull(type, "type");
Utils.checkNotNull(subtype, "subtype");
Utils.checkNotNull(title, "title");
Utils.checkNotNull(active, "active");
Utils.checkNotNull(filter, "filter");
@@ -64,6 +70,7 @@ public class GetRecentlyAddedType {
Utils.checkNotNull(field, "field");
this.key = key;
this.type = type;
this.subtype = subtype;
this.title = title;
this.active = active;
this.filter = filter;
@@ -76,7 +83,7 @@ public class GetRecentlyAddedType {
String type,
String title,
boolean active) {
this(key, type, title, active, Optional.empty(), Optional.empty(), Optional.empty());
this(key, type, Optional.empty(), title, active, Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
@@ -89,6 +96,11 @@ public class GetRecentlyAddedType {
return type;
}
@JsonIgnore
public Optional<String> subtype() {
return subtype;
}
@JsonIgnore
public String title() {
return title;
@@ -133,6 +145,18 @@ public class GetRecentlyAddedType {
return this;
}
public GetRecentlyAddedType withSubtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public GetRecentlyAddedType withSubtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public GetRecentlyAddedType withTitle(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
@@ -193,6 +217,7 @@ public class GetRecentlyAddedType {
return
Objects.deepEquals(this.key, other.key) &&
Objects.deepEquals(this.type, other.type) &&
Objects.deepEquals(this.subtype, other.subtype) &&
Objects.deepEquals(this.title, other.title) &&
Objects.deepEquals(this.active, other.active) &&
Objects.deepEquals(this.filter, other.filter) &&
@@ -205,6 +230,7 @@ public class GetRecentlyAddedType {
return Objects.hash(
key,
type,
subtype,
title,
active,
filter,
@@ -217,6 +243,7 @@ public class GetRecentlyAddedType {
return Utils.toString(GetRecentlyAddedType.class,
"key", key,
"type", type,
"subtype", subtype,
"title", title,
"active", active,
"filter", filter,
@@ -230,6 +257,8 @@ public class GetRecentlyAddedType {
private String type;
private Optional<String> subtype = Optional.empty();
private String title;
private Boolean active;
@@ -256,6 +285,18 @@ public class GetRecentlyAddedType {
return this;
}
public Builder subtype(String subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = Optional.ofNullable(subtype);
return this;
}
public Builder subtype(Optional<String> subtype) {
Utils.checkNotNull(subtype, "subtype");
this.subtype = subtype;
return this;
}
public Builder title(String title) {
Utils.checkNotNull(title, "title");
this.title = title;
@@ -308,6 +349,7 @@ public class GetRecentlyAddedType {
return new GetRecentlyAddedType(
key,
type,
subtype,
title,
active,
filter,

View File

@@ -0,0 +1,37 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
/**
* GetSearchAllLibrariesQueryParamIncludeCollections - Whether to include collections in the search results.
*/
public enum GetSearchAllLibrariesQueryParamIncludeCollections {
Disable(0),
Enable(1);
@JsonValue
private final int value;
private GetSearchAllLibrariesQueryParamIncludeCollections(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetSearchAllLibrariesQueryParamIncludeCollections> fromValue(int value) {
for (GetSearchAllLibrariesQueryParamIncludeCollections o: GetSearchAllLibrariesQueryParamIncludeCollections.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,37 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
/**
* GetSearchAllLibrariesQueryParamIncludeExternalMedia - Whether to include external media in the search results.
*/
public enum GetSearchAllLibrariesQueryParamIncludeExternalMedia {
Disable(0),
Enable(1);
@JsonValue
private final int value;
private GetSearchAllLibrariesQueryParamIncludeExternalMedia(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<GetSearchAllLibrariesQueryParamIncludeExternalMedia> fromValue(int value) {
for (GetSearchAllLibrariesQueryParamIncludeExternalMedia o: GetSearchAllLibrariesQueryParamIncludeExternalMedia.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -51,13 +51,13 @@ public class GetSearchAllLibrariesRequest {
* Whether to include collections in the search results.
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeCollections")
private Optional<? extends QueryParamIncludeCollections> includeCollections;
private Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections> includeCollections;
/**
* Whether to include external media in the search results.
*/
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=includeExternalMedia")
private Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia;
private Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia> includeExternalMedia;
@JsonCreator
public GetSearchAllLibrariesRequest(
@@ -65,8 +65,8 @@ public class GetSearchAllLibrariesRequest {
String clientID,
Optional<Long> limit,
Optional<? extends List<SearchTypes>> searchTypes,
Optional<? extends QueryParamIncludeCollections> includeCollections,
Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia) {
Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections> includeCollections,
Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia> includeExternalMedia) {
Utils.checkNotNull(query, "query");
Utils.checkNotNull(clientID, "clientID");
Utils.checkNotNull(limit, "limit");
@@ -126,8 +126,8 @@ public class GetSearchAllLibrariesRequest {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<QueryParamIncludeCollections> includeCollections() {
return (Optional<QueryParamIncludeCollections>) includeCollections;
public Optional<GetSearchAllLibrariesQueryParamIncludeCollections> includeCollections() {
return (Optional<GetSearchAllLibrariesQueryParamIncludeCollections>) includeCollections;
}
/**
@@ -135,8 +135,8 @@ public class GetSearchAllLibrariesRequest {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<QueryParamIncludeExternalMedia> includeExternalMedia() {
return (Optional<QueryParamIncludeExternalMedia>) includeExternalMedia;
public Optional<GetSearchAllLibrariesQueryParamIncludeExternalMedia> includeExternalMedia() {
return (Optional<GetSearchAllLibrariesQueryParamIncludeExternalMedia>) includeExternalMedia;
}
public final static Builder builder() {
@@ -202,7 +202,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include collections in the search results.
*/
public GetSearchAllLibrariesRequest withIncludeCollections(QueryParamIncludeCollections includeCollections) {
public GetSearchAllLibrariesRequest withIncludeCollections(GetSearchAllLibrariesQueryParamIncludeCollections includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = Optional.ofNullable(includeCollections);
return this;
@@ -211,7 +211,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include collections in the search results.
*/
public GetSearchAllLibrariesRequest withIncludeCollections(Optional<? extends QueryParamIncludeCollections> includeCollections) {
public GetSearchAllLibrariesRequest withIncludeCollections(Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections> includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = includeCollections;
return this;
@@ -220,7 +220,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include external media in the search results.
*/
public GetSearchAllLibrariesRequest withIncludeExternalMedia(QueryParamIncludeExternalMedia includeExternalMedia) {
public GetSearchAllLibrariesRequest withIncludeExternalMedia(GetSearchAllLibrariesQueryParamIncludeExternalMedia includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = Optional.ofNullable(includeExternalMedia);
return this;
@@ -229,7 +229,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include external media in the search results.
*/
public GetSearchAllLibrariesRequest withIncludeExternalMedia(Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia) {
public GetSearchAllLibrariesRequest withIncludeExternalMedia(Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia> includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = includeExternalMedia;
return this;
@@ -285,9 +285,9 @@ public class GetSearchAllLibrariesRequest {
private Optional<? extends List<SearchTypes>> searchTypes = Optional.empty();
private Optional<? extends QueryParamIncludeCollections> includeCollections;
private Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections> includeCollections;
private Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia;
private Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia> includeExternalMedia;
private Builder() {
// force use of static builder() method
@@ -352,7 +352,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include collections in the search results.
*/
public Builder includeCollections(QueryParamIncludeCollections includeCollections) {
public Builder includeCollections(GetSearchAllLibrariesQueryParamIncludeCollections includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = Optional.ofNullable(includeCollections);
return this;
@@ -361,7 +361,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include collections in the search results.
*/
public Builder includeCollections(Optional<? extends QueryParamIncludeCollections> includeCollections) {
public Builder includeCollections(Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections> includeCollections) {
Utils.checkNotNull(includeCollections, "includeCollections");
this.includeCollections = includeCollections;
return this;
@@ -370,7 +370,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include external media in the search results.
*/
public Builder includeExternalMedia(QueryParamIncludeExternalMedia includeExternalMedia) {
public Builder includeExternalMedia(GetSearchAllLibrariesQueryParamIncludeExternalMedia includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = Optional.ofNullable(includeExternalMedia);
return this;
@@ -379,7 +379,7 @@ public class GetSearchAllLibrariesRequest {
/**
* Whether to include external media in the search results.
*/
public Builder includeExternalMedia(Optional<? extends QueryParamIncludeExternalMedia> includeExternalMedia) {
public Builder includeExternalMedia(Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia> includeExternalMedia) {
Utils.checkNotNull(includeExternalMedia, "includeExternalMedia");
this.includeExternalMedia = includeExternalMedia;
return this;
@@ -400,17 +400,17 @@ public class GetSearchAllLibrariesRequest {
includeExternalMedia);
}
private static final LazySingletonValue<Optional<? extends QueryParamIncludeCollections>> _SINGLETON_VALUE_IncludeCollections =
private static final LazySingletonValue<Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections>> _SINGLETON_VALUE_IncludeCollections =
new LazySingletonValue<>(
"includeCollections",
"0",
new TypeReference<Optional<? extends QueryParamIncludeCollections>>() {});
new TypeReference<Optional<? extends GetSearchAllLibrariesQueryParamIncludeCollections>>() {});
private static final LazySingletonValue<Optional<? extends QueryParamIncludeExternalMedia>> _SINGLETON_VALUE_IncludeExternalMedia =
private static final LazySingletonValue<Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia>> _SINGLETON_VALUE_IncludeExternalMedia =
new LazySingletonValue<>(
"includeExternalMedia",
"0",
new TypeReference<Optional<? extends QueryParamIncludeExternalMedia>>() {});
new TypeReference<Optional<? extends GetSearchAllLibrariesQueryParamIncludeExternalMedia>>() {});
}
}

View File

@@ -17,7 +17,9 @@ public enum GetSearchAllLibrariesType {
Movie("movie"),
TvShow("show"),
Season("season"),
Episode("episode");
Episode("episode"),
Artist("artist"),
Album("album");
@JsonValue
private final String value;

View File

@@ -7,33 +7,43 @@ package dev.plexapi.sdk.models.operations;
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.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class Guids {
/**
* The GUID value.
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("id")
private String id;
private Optional<String> id;
@JsonCreator
public Guids(
@JsonProperty("id") String id) {
@JsonProperty("id") Optional<String> id) {
Utils.checkNotNull(id, "id");
this.id = id;
}
public Guids() {
this(Optional.empty());
}
/**
* The GUID value.
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
@JsonIgnore
public String id() {
public Optional<String> id() {
return id;
}
@@ -42,9 +52,20 @@ public class Guids {
}
/**
* The GUID value.
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
public Guids withId(String id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
/**
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
public Guids withId(Optional<String> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
@@ -77,16 +98,27 @@ public class Guids {
public final static class Builder {
private String id;
private Optional<String> id = Optional.empty();
private Builder() {
// force use of static builder() method
}
/**
* The GUID value.
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
public Builder id(String id) {
Utils.checkNotNull(id, "id");
this.id = Optional.ofNullable(id);
return this;
}
/**
* The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
*
*/
public Builder id(Optional<String> id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;

View File

@@ -0,0 +1,37 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
/**
* IncludeAdvanced
*/
public enum IncludeAdvanced {
Disable(0),
Enable(1);
@JsonValue
private final int value;
private IncludeAdvanced(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<IncludeAdvanced> fromValue(int value) {
for (IncludeAdvanced o: IncludeAdvanced.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,34 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
public enum One {
ZERO(0),
ONE(1);
@JsonValue
private final int value;
private One(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<One> fromValue(int value) {
for (One o: One.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -0,0 +1,34 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
public enum OptimizedForStreaming1 {
ZERO(0),
ONE(1);
@JsonValue
private final int value;
private OptimizedForStreaming1(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<OptimizedForStreaming1> fromValue(int value) {
for (OptimizedForStreaming1 o: OptimizedForStreaming1.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -9,7 +9,7 @@ import java.util.Objects;
import java.util.Optional;
/**
* QueryParamIncludeCollections - Whether to include collections in the search results.
* QueryParamIncludeCollections
*/
public enum QueryParamIncludeCollections {
Disable(0),

View File

@@ -9,7 +9,7 @@ import java.util.Objects;
import java.util.Optional;
/**
* QueryParamIncludeExternalMedia - Whether to include external media in the search results.
* QueryParamIncludeExternalMedia
*/
public enum QueryParamIncludeExternalMedia {
Disable(0),

View File

@@ -0,0 +1,38 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.operations;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import java.util.Optional;
/**
* QueryParamIncludeGuids - Adds the Guid object to the response
*
*/
public enum QueryParamIncludeGuids {
Disable(0),
Enable(1);
@JsonValue
private final int value;
private QueryParamIncludeGuids(int value) {
this.value = value;
}
public int value() {
return value;
}
public static Optional<QueryParamIncludeGuids> fromValue(int value) {
for (QueryParamIncludeGuids o: QueryParamIncludeGuids.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}

View File

@@ -15,7 +15,7 @@ import java.lang.String;
import java.util.Objects;
public class Rating {
public class Ratings {
/**
* The image or reference for the rating.
@@ -36,7 +36,7 @@ public class Rating {
private String type;
@JsonCreator
public Rating(
public Ratings(
@JsonProperty("image") String image,
@JsonProperty("value") float value,
@JsonProperty("type") String type) {
@@ -79,7 +79,7 @@ public class Rating {
/**
* The image or reference for the rating.
*/
public Rating withImage(String image) {
public Ratings withImage(String image) {
Utils.checkNotNull(image, "image");
this.image = image;
return this;
@@ -88,7 +88,7 @@ public class Rating {
/**
* The rating value.
*/
public Rating withValue(float value) {
public Ratings withValue(float value) {
Utils.checkNotNull(value, "value");
this.value = value;
return this;
@@ -97,7 +97,7 @@ public class Rating {
/**
* The type of rating (e.g., audience, critic).
*/
public Rating withType(String type) {
public Ratings withType(String type) {
Utils.checkNotNull(type, "type");
this.type = type;
return this;
@@ -111,7 +111,7 @@ public class Rating {
if (o == null || getClass() != o.getClass()) {
return false;
}
Rating other = (Rating) o;
Ratings other = (Ratings) o;
return
Objects.deepEquals(this.image, other.image) &&
Objects.deepEquals(this.value, other.value) &&
@@ -128,7 +128,7 @@ public class Rating {
@Override
public String toString() {
return Utils.toString(Rating.class,
return Utils.toString(Ratings.class,
"image", image,
"value", value,
"type", type);
@@ -173,8 +173,8 @@ public class Rating {
return this;
}
public Rating build() {
return new Rating(
public Ratings build() {
return new Ratings(
image,
value,
type);

View File

@@ -269,6 +269,12 @@ public class SDKMethodInterfaces {
}
public interface MethodCallGetAllMediaLibrary {
GetAllMediaLibraryResponse getAllMediaLibrary(
GetAllMediaLibraryRequest request) throws Exception;
}
public interface MethodCallGetRefreshLibraryMetadata {
GetRefreshLibraryMetadataResponse getRefreshLibraryMetadata(
Optional<? extends Force> force,

View File

@@ -13,7 +13,6 @@ import java.util.Optional;
* Tag - A key representing a specific tag within the section.
*/
public enum Tag {
ALL("all"),
UNWATCHED("unwatched"),
NEWEST("newest"),
RECENTLY_ADDED("recentlyAdded"),
@@ -21,12 +20,9 @@ public enum Tag {
ON_DECK("onDeck"),
COLLECTION("collection"),
EDITION("edition"),
GENRE("genre"),
YEAR("year"),
DECADE("decade"),
DIRECTOR("director"),
ACTOR("actor"),
COUNTRY("country"),
CONTENT_RATING("contentRating"),
RATING("rating"),
RESOLUTION("resolution"),